Skip to content

Commit

Permalink
chore: use GitHub App token to create PR in workflow
Browse files Browse the repository at this point in the history
Fixes #662

This switches the github token used to create a pull request for a release candidate to use a token from a GitHub App that I have created for Awana Digital called "Awana PR Bot".

The reason for this change is so that PR checks run when the PR is opened by the [`create-release-candidate.yml`](.github/workflows/create-release-candidate.yml) workflow. Without this change, workflows are not triggered by the PR being opened.
  • Loading branch information
gmaclennan committed Sep 9, 2024
1 parent 6cd4774 commit 040d52d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/create-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,16 @@ jobs:
echo "DEPLOY_BRANCH_EXISTS=false" >> $GITHUB_ENV
fi
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_BOT_APP_ID }}
private-key: ${{ secrets.PR_BOT_PRIVATE_KEY }}

- name: Create Pull Request to deploy
if: env.DEPLOY_BRANCH_EXISTS == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
new_version=${{ env.VERSION }}
branch_name=${{ env.BRANCH_NAME }}
Expand Down

0 comments on commit 040d52d

Please sign in to comment.