diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-merge.yml similarity index 53% rename from .github/workflows/dependabot-auto-approve.yml rename to .github/workflows/dependabot-auto-merge.yml index 180245b..1999b6d 100644 --- a/.github/workflows/dependabot-auto-approve.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,13 +1,14 @@ -name: Dependabot auto-approve +name: Dependabot auto-merge on: pull_request permissions: + contents: write pull-requests: write jobs: dependabot: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == andreschaffer/http-caching-and-concurrency-examples' steps: - name: Dependabot metadata id: metadata @@ -19,3 +20,8 @@ jobs: env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}