Skip to content

Commit

Permalink
feat: use a bot account to author mass-bump commits
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 committed Jun 16, 2023
1 parent 84fd154 commit 1245a09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/scripts/bump-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,11 @@ findAndBump() {
}

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
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global user.email "aniyomi-bot@aniyomi.org"
git config --global user.name "aniyomi-bot[bot]"
git add $@
git commit -m "Mass-bump on extensions"
git commit -S -m "[skip ci] chore: Mass-bump on extensions"
git push
fi
}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: master
token: ${{ secrets.ANIYOMIORG_BOT_PAT }}

- name: Find lib changes
id: modified-libs
Expand All @@ -37,6 +38,15 @@ jobs:
files_ignore: lib/**.md
files_separator: " "
# 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
if: steps.modified-libs.outputs.any_changed == 'true'
run: |
Expand Down

0 comments on commit 1245a09

Please sign in to comment.