From 699e716dfb20dcfc342c29a3bb7e098aa12df228 Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Thu, 26 Sep 2024 15:39:52 +0200 Subject: [PATCH] ci(dependabot): fix triggering condition and metadata step --- .github/workflows/dependabot_pr.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependabot_pr.yml b/.github/workflows/dependabot_pr.yml index d4fd1e06..cdba4552 100644 --- a/.github/workflows/dependabot_pr.yml +++ b/.github/workflows/dependabot_pr.yml @@ -4,20 +4,27 @@ on: pull_request: types: - opened + - synchronize + - reopened + - labeled + +permissions: + contents: write + pull-requests: write jobs: tests: - if: github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.issue.labels.*.name, 'dependencies') + if: github.actor == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies') uses: ./.github/workflows/tests.yml dependabot: runs-on: ubuntu-latest - if: github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.issue.labels.*.name, 'dependencies') + if: github.actor == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies') needs: [tests] steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.3.2 + uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}"