Skip to content

Commit

Permalink
automerge helper
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiactual committed Jun 12, 2024
1 parent 92c8a5c commit 67688f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ jobs:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ secrets.AUTOMERGE_APP_ID }}
private-key: ${{ secrets.AUTOMERGE_PRIVATE_KEY }}
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
github-token: '${{ steps.app-token.outputs.token }}'
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_TOKEN: '${{ steps.app-token.outputs.token }}'

0 comments on commit 67688f4

Please sign in to comment.