forked from Misaka-blog/chromego_merge
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.23 KB
/
merge.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
42
43
44
45
46
47
name: Merge Script
on:
# push:
# branches:
# - main # 替换为你的默认分支
schedule:
- cron: '0 0/6 * * *' # 每 6h 一次
workflow_dispatch: # 触发手动事件
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run merge script
run: python meta_merge.py
# - name: Run shadowrocket merge script
# run: python merge.py
# - name: Run sing-box script
# 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