Skip to content

Commit 3337bc1

Browse files
authored
chore: auto approve dependabot pr (#4720)
1 parent ba5e179 commit 3337bc1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/automerge.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)