Skip to content

Commit

Permalink
Fixed automerge dependabot's PRs (#4271)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiuszkierat authored Jan 15, 2025
1 parent 7b2bf18 commit 9a8d22d
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


# `automerge` label is attached iff there is exactly one file changed by steward and this file belongs to a
# `automerge` label is attached if there is exactly one file changed by steward and this file belongs to a
# whitelist specified by `labeler.yml`
label:
name: Attach automerge label
Expand All @@ -216,16 +216,31 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

auto-merge:
name: Auto merge
# only for PRs by softwaremill-ci and dependabot
if: github.event.pull_request.user.login == 'softwaremill-ci' ||
github.event.pull_request.user.login == 'dependabot[bot]'
auto-merge-softwaremill-ci:
name: Auto merge softwaremill-ci
# only for PRs by softwaremill-ci
if: github.event.pull_request.user.login == 'softwaremill-ci'
needs: [ ci, mima, label ]
runs-on: ubuntu-24.04
steps:
- id: automerge
name: automerge
- id: automerge-softwaremill-ci
name: automerge-softwaremill-ci
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_METHOD: "squash"

# separate `automerge` job for dependabot as it doesn't need label job
# labeling is done by dependabot itself
auto-merge-dependabot:
name: Auto merge dependabot
# only for PRs by dependabot
if: github.event.pull_request.user.login == 'dependabot[bot]'
needs: [ ci, mima ]
runs-on: ubuntu-24.04
steps:
- id: automerge-dependabot
name: automerge-dependabot
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand Down

0 comments on commit 9a8d22d

Please sign in to comment.