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

Github Actions: stop previous jobs when a new one was pushed #4351

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stt08
Copy link
Collaborator

@stt08 stt08 commented Sep 18, 2024

The following modification will cancel previous tasks/runs when a new one was pushed.

@@ -5,6 +5,10 @@ on: [push, pull_request]

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

Choose a reason for hiding this comment

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

github.ref for pull requests has the form of refs/pull/<pr_number>/merge, i.e. it already includes the pull request number.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changes applied

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

Successfully merging this pull request may close these issues.

2 participants