Skip to content

Commit

Permalink
ci(nointro): Change from PAT to GitHub App
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Feb 8, 2024
1 parent 2073965 commit 4be9bc3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/update-nointro-database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ jobs:
env:
COMMIT_MESSAGE: ":arrow_up: Update NoIntro database"
steps:
- name: Generate Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
submodules: true
- name: Change Cache Key
run: echo '// ${{ github.job }}' >> go.sum
Expand All @@ -29,7 +36,9 @@ jobs:
id: pr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}
token: ${{ steps.app-token.outputs.token }}
committer: gones-bot[bot] <159408161+gones-bot[bot]@users.noreply.github.com>
author: gones-bot[bot] <159408161+gones-bot[bot]@users.noreply.github.com>
add-paths: "*.csv"
commit-message: ${{ env.COMMIT_MESSAGE }}
branch: update-nointro-database
Expand All @@ -43,5 +52,6 @@ jobs:
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.pr.outputs.pull-request-operation == 'created'
with:
token: ${{ steps.app-token.outputs.token }}
pull-request-number: ${{ steps.pr.outputs.pull-request-number }}
merge-method: squash

0 comments on commit 4be9bc3

Please sign in to comment.