mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto approve & merge dependabot patch upgrade PRs (#30191)
Adapted from the [Github documentation][doc]. This version approves all patch upgrades to any dependency. Not sure if we have any dependency that must always be reviewed manually. [doc]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
acf7fdb90c
commit
3a17a88f1f
1 changed files with 25 additions and 0 deletions
25
.github/workflows/dependabot-pr.yml
vendored
Normal file
25
.github/workflows/dependabot-pr.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Approve & merge successful dependabot patch upgrade PRs
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
content: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
dependabot:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v1
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: Approve the PR & enable auto-merge
|
||||
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
|
||||
run: |
|
||||
gh pr review --approve "$PR_URL"
|
||||
gh pr merge --auto --merge "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
Loading…
Add table
Add a link
Reference in a new issue