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

ci: Fix concurrent test runs #49

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

joeyparrish
Copy link
Member

The concurrency group expression for the test workflow would work for pull_request triggers, but not pull_request_target triggers. This is because github.ref for pull_request is something like refs/pull/<pr_number>/merge, whereas for pull_request_target triggers it only references the target branch like refs/heads/main.

Instead we use github.event.number, which is the PR number, and fall back to github.run_id, which should be unique for manually-triggered runs of the workflow.

The concurrency group expression for the test workflow would work for pull_request triggers, but not pull_request_target triggers.  This is because github.ref for pull_request is something like refs/pull/<pr_number>/merge, whereas for pull_request_target triggers it only references the target branch like refs/heads/main.

Instead we use github.event.number, which is the PR number, and fall back to github.run_id, which should be unique for manually-triggered runs of the workflow.
@joeyparrish joeyparrish merged commit b98a1da into shaka-project:main Oct 11, 2024
7 checks passed
@joeyparrish joeyparrish deleted the fix-concurrency branch October 11, 2024 15:32
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Dec 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants