Skip to content

feat(cfg): add DIRECT option to AppleTV+ proxy group #13

feat(cfg): add DIRECT option to AppleTV+ proxy group

feat(cfg): add DIRECT option to AppleTV+ proxy group #13

name: Auto update mainland config
on:
push:
paths:
- cfg/Custom_Clash.ini
workflow_dispatch:
permissions:
contents: write
jobs:
update-mainland:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
- name: Generate Custom_Clash_Mainland.ini
run: cp -f cfg/Custom_Clash.ini cfg/Custom_Clash_Mainland.ini
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add cfg/Custom_Clash_Mainland.ini
# 确保在 main 分支
git checkout main
# 判断是否有变更,只有在有变更时才提交
if ! git diff --cached --quiet; then
git commit -m "chore: update Custom_Clash_Mainland.ini based on Custom_Clash.ini"
git pull --rebase origin main
git push origin main
else
echo "No changes to commit."
fi