Skip to content

Commit

Permalink
deps: run make generate and auto-approve dependency PRs (#4263)
Browse files Browse the repository at this point in the history
* ci: add GitHub Actions workflow for Dependabot auto-approval

* ci: update commit message for auto-commit action in Dependabot workflow

* Update .github/workflows/dep-autoapprove.yml

Co-authored-by: Alaric Whitney <[email protected]>

---------

Co-authored-by: Alaric Whitney <[email protected]>
  • Loading branch information
mastercactapus and AlaricWhitney authored Jan 30, 2025
1 parent 736b78d commit e899482
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/dep-autoapprove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot-approve:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'target/goalert'
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
- name: Run make generate
run: make generate
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply make generate changes
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit e899482

Please sign in to comment.