Skip to content

Commit

Permalink
Fix concurrency group in dry-run
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Kobzol committed Mar 6, 2025
1 parent ad844f2 commit 4b3b1e9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4b3b1e9

Please sign in to comment.