Exclude a specific job from workflow concurrency #124123
Unanswered
nikostitoworkable
asked this question in
Actions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I have a workflow with 3 jobs. I am using concurrency with
cancel-in-progress: true
, so that the workflow will cancel if another run is started for the same branch. But I wanted to exclude the last job of the workflow run, in a way that if the workflow has reached the last job, the job won't get canceled by another enqueued job and will be executed. I saw that we can pass a logical expression to cancel-in-progress key and could add something like:cancel-in-progress: ${{ github.job != 'last_job' }}
but my first job uses test matrixes and I can see there is an issue where only the last initialised matrix job will start executing and not get canceled. So I really can't use job level concurrency. Is there a more elegant way of ignoring cancel-in-progress only for a specific job, except of settingif: always()
to that job?Beta Was this translation helpful? Give feedback.
All reactions