-
-
Notifications
You must be signed in to change notification settings - Fork 41
41 lines (35 loc) · 1.33 KB
/
update-docs-readme-list.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: update-docs-readme-list
on:
workflow_run:
workflows:
- "update-scripts-version" #触发了自动更新.
- "merge-change-history" #触发了合并历史记录,可能json文件被改变,
types:
- completed
workflow_dispatch:
concurrency:
group: update-qinwuyuan-UserScripts-2
cancel-in-progress: false
jobs:
update-script-list:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.conclusion == 'success') }}
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install requests
- name: 执行README.md更新.刷新greasyfork数据
run: |
python utils/update_scripts_list.py
- name: 提交和推送更改
run: |
gpg --batch --import <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
git config --global user.name 'qinwuyuan-sync-bot'
git config --global user.email "${{ secrets.GPG_PRIVATE_EMAIL }}"
git config --global user.signingkey "${{ secrets.GPG_PRIVATE_ID }}"
git pull
git add .
git commit -n -S -m "docs: 更新脚本表格[\`ScriptsPath.json\`]→[\`README.md\`]" || echo "没有需要提交的更改"
git push