Skip to content

Concurrecy not work for push #27100

Answered by Simran-B
Yiyiyimu asked this question in Actions
Discussion options

You must be logged in to vote

The last setup you tried looks like it should work and do what you want.

name: test

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

I would expect a second push to the same branch to cancel an in-flight workflow run triggered by a push.

Do I understand correctly, that both workflows are executed in parallel and both succeed instead of one being canceled and the other succeeding?

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants