Daily Update Clash Config #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily Update Clash Config | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install Dependencies | |
run: | | |
pip install requests pyyaml urllib3 | |
- name: Run the script | |
run: | | |
python clash.py | |
python clash_extra.py | |
- name: Commit and Push changes | |
run: | | |
git config user.name "SnapdragonLee" # 改为你的 GitHub 用户名 | |
git config user.email "lixiaolong8088888@gmail.com" # 与GitHub绑定并验证的邮箱 | |
git add . | |
CURRENT_TIME=$(TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M:%S (UTC+8)') | |
git diff-index --quiet HEAD || git commit -m "${CURRENT_TIME}" | |
git push "https://x-access-token:${{ secrets.PERSONAL_TOKEN }}@github.com/SnapdragonLee/SystemProxy.git" HEAD:master |