Skip to content

Merge subs

Merge subs #2016

Workflow file for this run

name: Merge subs
on:
# push自动触发
# push:
# branches:
# - main # 触发的分支
# 定时自动触发
schedule:
- cron: "0 * * * *" # 每小时触发
# 手动触发
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: pip install -r requirements.txt
- name: merge meta urls
run: python meta_merge.py
- name: merge shadowrocket urls
run: python merge.py
- name: merge sing-box urls
run: python sing-box.py
- name: Commit Changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Changes detected in the repository."
git config core.ignorecase false
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Updated at $(date '+%Y-%m-%d %H:%M:%S')"
git push
else
echo "No changes detected in the repository."
fi