Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrency setting in GHA cancels runs across PRs #554

Open
AnomalRoil opened this issue Sep 23, 2024 · 0 comments
Open

Concurrency setting in GHA cancels runs across PRs #554

AnomalRoil opened this issue Sep 23, 2024 · 0 comments
Assignees

Comments

@AnomalRoil
Copy link
Contributor

Currently our GHA are using pull_request_target instead of pull_request:

pull_request_target:

This has the unfortunate consequence that 2 different PRs can cancel each other jobs, because of how github.ref works:

Trigger event pull_request pull_request_target push
gihub.ref refs/pull/553/merge refs/heads/master refs/heads/test/pull_request_target
gihub.head_ref test/pull_request_target test/pull_request_target -
  • master: default branch
  • test/pull_request_target: topic branch name
  • 553: pull request number

I think the solution is to switch our concurrency groups from gihub.ref to gihub.head_ref:

concurrency:
group: ci-${{ github.ref }}-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants