diff --git a/.github/workflows/goreleaser-deprecation-check.yml b/.github/workflows/goreleaser-deprecation-check.yml index 73f4a76..fdf45e3 100644 --- a/.github/workflows/goreleaser-deprecation-check.yml +++ b/.github/workflows/goreleaser-deprecation-check.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - build: + check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,3 +16,21 @@ jobs: - name: check run: | goreleaser check goreleaser*.yaml + dependabot: + needs: [check] + 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 review --approve "$PR_URL" + gh pr merge --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}