Merge Files automatically #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Merge Files automatically | |
on: | |
schedule: | |
- cron: "0 0 * * *" # daily cron | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Update_README: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Main Branch | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
path: ./ | |
- name: Install Requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Auto Update Star | |
run: | | |
python auto_update_star.py || true | |
- name: Auto Translate | |
run: | | |
python auto_translator.py || true | |
- name: Commit and Push Changes | |
run: | | |
git config user.name "Action Sync Bot" | |
git config user.email "actions@github.com" | |
git add README.md README_en.md | |
git commit -m "automatically commit and push" || true | |
git push origin HEAD:main || true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用GitHub提供的token进行身份验证 |