From ab3b653af1b184fd374a0bdee202966a66595e3d Mon Sep 17 00:00:00 2001 From: Vianney Bouchaud Date: Fri, 3 May 2024 22:00:29 +0200 Subject: [PATCH] testing auto-merging with dependabot --- .github/workflows/pr-dependabot.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-dependabot.yml b/.github/workflows/pr-dependabot.yml index ad58b14..354f827 100644 --- a/.github/workflows/pr-dependabot.yml +++ b/.github/workflows/pr-dependabot.yml @@ -8,20 +8,21 @@ permissions: jobs: dependabot: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} steps: - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v1 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}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs - # if: contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch' run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}}