You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 setting if: always() to that job?
ActionsBuild, test, and automate your deployment pipeline with world-class CI/CDQuestion
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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