| name: Dependabot auto-approve | |
| on: pull_request | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| dependabot-approve: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'target/goalert' | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - uses: actions/cache@v4 | |
| with: | |
| key: key | |
| path: ~/.bun/install/cache | |
| - name: Run make generate | |
| run: make generate | |
| - uses: stefanzweifel/git-auto-commit-action@v6 | |
| 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}} | |