Skip to content

Commit

Permalink
Use pull_request_target for dependabot auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Nov 21, 2022
1 parent 65ec34c commit 0be744b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/automerge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: Auto-Merge Dependabot Updates

on:
pull_request:
pull_request_target:
types:
- opened
- synchronize

permissions:
pull_requests: write

jobs:
automerge:
name: Enable Auto-Merge for Dependabot
if: github.event.pull_request.user.login == 'dependabot[bot]'
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.actor == 'dependabot[bot]'
runs-on: ubuntu-22.04

steps:
- name: Enable auto-merge
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ github.event.pull_request.number }}
merge-method: squash

0 comments on commit 0be744b

Please sign in to comment.