Skip to content

Daily Update Clash Config #3

Daily Update Clash Config

Daily Update Clash Config #3

Workflow file for this run

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@example.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:main