-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (32 loc) · 1.08 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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