feat: use a bot account to author mass-bump commits

This commit is contained in:
jmir1 2023-06-16 23:42:55 +02:00
parent 84fd1542bb
commit 1245a09d96
No known key found for this signature in database
GPG Key ID: 7B3B624787A072BD
2 changed files with 13 additions and 5 deletions

View File

@ -89,13 +89,11 @@ findAndBump() {
} }
commitChanges() { commitChanges() {
# this will NOT trigger another workflow, because it will use $GITHUB_TOKEN.
# so the build-action will run fine with the bumped-up extensions
if [[ -n "$@" ]]; then if [[ -n "$@" ]]; then
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "aniyomi-bot@aniyomi.org"
git config --global user.name "github-actions[bot]" git config --global user.name "aniyomi-bot[bot]"
git add $@ git add $@
git commit -m "Mass-bump on extensions" git commit -S -m "[skip ci] chore: Mass-bump on extensions"
git push git push
fi fi
} }

View File

@ -28,6 +28,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: master ref: master
token: ${{ secrets.ANIYOMIORG_BOT_PAT }}
- name: Find lib changes - name: Find lib changes
id: modified-libs id: modified-libs
@ -37,6 +38,15 @@ jobs:
files_ignore: lib/**.md files_ignore: lib/**.md
files_separator: " " files_separator: " "
# This step is going to commit, but this will not trigger another workflow. # This step is going to commit, but this will not trigger another workflow.
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Bump extensions that uses a modified lib - name: Bump extensions that uses a modified lib
if: steps.modified-libs.outputs.any_changed == 'true' if: steps.modified-libs.outputs.any_changed == 'true'
run: | run: |