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

Cancel in progress workflows on new commit #6759

Merged
merged 5 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/e2e-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
- '**.md'
- 'LICENSE'

# cancel workflows if a new one is triggered on the same branch.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# dynamically build a matrix of test/test suite pairs to run
build-test-matrix:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/e2e-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
# trigger workflow if PR is marked ready for review.
- ready_for_review

# cancel workflows if a new one is triggered on the same branch.
concurrency:
group: ${{ github.ref }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to group by workflow just in case? https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-and-the-default-behavior

I don't think this would have any tangible diff, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to right? I think it's fair to say that if we push a new commit we want to cancel everything that was running and just re-run them from scratch with the new code

cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancels if not on main, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep this is my understanding of it, we will leave the ones that run on main alone


jobs:
# determine-image-tag will either output the PR number e.g. pr-1234 or the string main.
# this will be used to tag the images that are built during the workflow.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
- 'docs/**'
- '**.md'
- 'LICENSE'
# cancel workflows if a new one is triggered on the same branch.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# determine-image-tag will either output the PR number e.g. pr-1234 or the string main.
Expand Down
Loading