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

Add concurrency to our workflows #158

Closed
yannick-roeder opened this issue Oct 20, 2023 · 0 comments · Fixed by #159
Closed

Add concurrency to our workflows #158

yannick-roeder opened this issue Oct 20, 2023 · 0 comments · Fixed by #159
Assignees

Comments

@yannick-roeder
Copy link
Member

yannick-roeder commented Oct 20, 2023

Ideally the previous workflow is cancelled when the newer workflow is already running. This can be achieved with workflow concurrency. Adding this to every workflow should be sufficient:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker
  cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}

Note that the suffix of the group is always specific to the workflow to avoid that different workflows cancel each other in the same run.

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

Successfully merging a pull request may close this issue.

2 participants