From daae714196721bc635f20b387538ed935c0b32ad Mon Sep 17 00:00:00 2001 From: containerscrew Date: Fri, 6 Dec 2024 22:35:49 +0100 Subject: [PATCH] Change auto-merge pipeline --- .github/workflows/auto-merge.yml | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 6622e25..cf250d6 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -1,25 +1,25 @@ -name: Auto Merge Dependabot PRs +name: Dependabot auto-merge -on: - pull_request: - types: - - opened - - synchronize - - reopened +on: pull_request + +permissions: + contents: write + pull-requests: write jobs: - auto-merge: - name: Auto-merge dependabot PRs + dependabot: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'containerscrew/nflux' steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Auto-merge PR if it bumps the clap dependency - uses: pascalgn/automerge-action@v0.16.4 + - 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: - GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} - with: - MERGE_METHOD: "squash" - LOG: "TRACE" + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}