1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-29 01:44:39 +02:00

ci: auto-merge dependabot PRs

This commit is contained in:
Carlos Alexandro Becker 2024-11-01 09:56:46 -03:00
parent c92ffb4298
commit 3cf2556a26
No known key found for this signature in database
2 changed files with 16 additions and 24 deletions

View File

@ -72,3 +72,19 @@ jobs:
with:
fetch-depth: 0
- run: go run . check
dependabot:
needs: [test]
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- id: metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: gh pr merge --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

View File

@ -1,24 +0,0 @@
# see https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
name: dependabot
on:
pull_request:
permissions:
pull-requests: write
jobs:
automation:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- id: metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}