forked from ChinaGodMan/UserScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.13 KB
/
Copy pathtranslate-scripts-md.yml
File metadata and controls
33 lines (30 loc) · 1.13 KB
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
name: translate-script-readme
##最后触发更新整个所有脚本的其他语言文档.
on:
workflow_run:
workflows: ["merge-change-history"]
types:
- completed
workflow_dispatch:
jobs:
translate-script-readme:
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
with:
fetch-depth: 0
- name: 读取并翻译 README
run: |
python utils/translate_chinese_to_filelang.py
- name: 提交和推送更改
run: |
gpg --batch --import <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
git config --global user.name 'ChinaGodBot'
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(ci): 📝 谷歌翻译[\`README{_xx}.md\`]" || echo "没有需要提交的更改"
git push