-
Notifications
You must be signed in to change notification settings - Fork 51
Add cancel-in-progress #651
Add cancel-in-progress #651
Conversation
456587f
to
12a8aba
Compare
.github/workflows/check_license.yml
Outdated
@@ -6,6 +6,11 @@ on: | |||
jobs: | |||
check-spdx-headers: | |||
runs-on: ubuntu-latest | |||
|
|||
concurrency: | |||
group: ${{ github.ref }}-${{ github.workflow }}-check-spdx-headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General idea is to have a unique group-id for each job. I first tried including ${{ github.job }}
but that is not set when this is evaluated, so now the pattern is ref-workflow-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we put it one layer up on the same level as jobs? because if one workflow will have one with a higher priority it will cancel all and we need less code. Should work too according to the docs.
I tried to put the concurrent on workflow level like below, but then the cancel-in-progress seemed to cancel all but one of the jobs in that workflow. Will test a bit more
|
ffc6042
to
a2b7e65
Compare
Intention is to cancel ongoing/queued jobs if a new version of a PR is uploaded Fixes eclipse-archived#626
a2b7e65
to
f9893ad
Compare
I think I found the problem of having concurrency defined on workflow level - we can have it for all but the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and everything is green
If an actual (sequence of) cancel(s) later leads to some unforeseen problems, we will see and can fix it then :)
Intention is to cancel ongoing/queued jobs if a new version of a PR is uploaded
Fixes #626