Sync Changelog From MaiBot #78
This file contains hidden or 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: Sync Changelog From MaiBot | |
| on: | |
| schedule: | |
| - cron: "0 20 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs repo | |
| uses: actions/checkout@v4 | |
| - name: Download changelog | |
| run: | | |
| curl -L \ | |
| https://raw.githubusercontent.com/Mai-with-u/MaiBot/main/changelogs/changelog.md \ | |
| -o manual/other/changelog.md | |
| - name: Commit changes | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "actions@github.com" | |
| if git diff --quiet; then | |
| echo "No changes, skip commit" | |
| exit 0 | |
| fi | |
| git add manual/other/changelog.md | |
| git commit -m "sync: update changelog from MaiBot" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |