-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split auto-merge job into its own action
- Loading branch information
1 parent
8d52d56
commit 1ed88be
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Dependabot Auto Merge | ||
# | ||
# This Action will automatically merge Pull Requests created by Dependabot. | ||
name: 'Dependency review' | ||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
dependency-auto-merge: | ||
name: 'Auto merge Dependabot updates' | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
|
||
steps: | ||
- uses: fastify/github-action-merge-dependabot@v3 | ||
with: | ||
use-github-auto-merge: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,23 +60,3 @@ jobs: | |
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later | ||
# retry-on-snapshot-warnings: true | ||
|
||
dependency-auto-merge: | ||
name: 'Auto merge (Dependabot PR)' | ||
runs-on: ubuntu-latest | ||
needs: [dependency-submission, dependency-review] | ||
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} | ||
|
||
steps: | ||
- name: Fetch metadata | ||
id: metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
- name: Enable auto-merge | ||
id: auto-merge | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|