Skip to content

build(deps): bump the go group across 1 directory with 7 updates #86

build(deps): bump the go group across 1 directory with 7 updates

build(deps): bump the go group across 1 directory with 7 updates #86

name: Dependabot Pull Request Approve (later merge)
on: pull_request
permissions:
pull-requests: write
contents: write
jobs:
tests_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.x"
cache-dependency-path: ./go.sum
- run: make test
dependabot_pr:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
needs: tests_pr
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Wait with this step
# - name: Enable auto-merge for Dependabot PRs
# if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor' }}
# needs: dependabot_pr
# run: gh pr merge --auto --squash "$PR_URL"
# env:
# PR_URL: ${{ github.event.pull_request.html_url }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}