From 4b3b1e901075e4f68900d11d5916802a89feaa51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 6 Mar 2025 14:32:28 +0100 Subject: [PATCH] Fix concurrency group in dry-run The PR number is again unavailable on PRs from forks. We should also apply the concurrency group only to the job, not the whole workflow, so that it doesn't race with the workflow being executed from master. --- .github/workflows/dry-run.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml index fff2a2477..d40b05cf0 100644 --- a/.github/workflows/dry-run.yml +++ b/.github/workflows/dry-run.yml @@ -18,15 +18,14 @@ on: types: - completed -concurrency: - # Only run this once at a time on any given PR - group: dry-run-${{ github.event.workflow_run.pull_requests[0].number }} - cancel-in-progress: true - jobs: dry-run: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }} + concurrency: + # Only run this once at a time on any given PR + group: dry-run-${{ github.event.workflow_run.head_branch }} + cancel-in-progress: true permissions: pull-requests: write steps: