Skip to content

Commit

Permalink
Fix for dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonghi committed Feb 10, 2025
1 parent 3fecd3d commit c873dc4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Enable auto-merge
if: github.actor == 'dependabot[bot]'
- name: Find PR number
id: find_pr
run: |
gh pr merge --auto --squash "$GITHUB_REF"
PR_NUMBER=$(gh pr list --state open --author "dependabot[bot]" --json number --jq '.[0].number')
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Enable auto-merge
if: steps.find_pr.outputs.PR_NUMBER != ''
run: gh pr merge --auto --squash "$PR_NUMBER"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c873dc4

Please sign in to comment.