File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,12 +22,20 @@ jobs:
2222 with :
2323 github-token : " ${{ secrets.GITHUB_TOKEN }}"
2424
25+ - name : Generate token
26+ id : app-token
27+ if : ${{ steps.meta.outputs.update-type == null || steps.meta.outputs.update-type == 'version-update:semver-patch' || (!startsWith(steps.meta.outputs.previous-version, '0.') && steps.meta.outputs.update-type == 'version-update:semver-minor') }}
28+ uses : actions/create-github-app-token@v2
29+ with :
30+ app-id : ${{ secrets.APP_ID }}
31+ private-key : ${{ secrets.GH_APP_PRIVATE_KEY }}
32+
2533 # Here the PR gets approved.
2634 - name : Approve a PR
2735 if : ${{ steps.meta.outputs.update-type == null || steps.meta.outputs.update-type == 'version-update:semver-patch' || (!startsWith(steps.meta.outputs.previous-version, '0.') && steps.meta.outputs.update-type == 'version-update:semver-minor') }}
2836 run : gh pr review --approve "${{ github.event.pull_request.html_url }}"
2937 env :
30- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
3139
3240 # Finally, this sets the PR to allow auto-merging for patch and minor
3341 # updates if all checks pass
You can’t perform that action at this time.
0 commit comments