chore(CI/CD): Enable only one run per PR (cancel previous) - #550
chore(CI/CD): Enable only one run per PR (cancel previous)#550rgildein wants to merge 3 commits into
Conversation
Add concurrency and group for all GitHub actions, the group name is composed: - github.workflow — the workflow's name: field (e.g. "Lint", "Test and Code Coverage") - github.ref — the full ref of the branch or tag that triggered the run (e.g. refs/heads/feat/my-feature, refs/pull/42/merge) Actions cancelling prior runs on new push: check-codegen, kustomize-validation, lint, test, test-gnmi, test-e2e, test-chart, reuse, size-label. Both publish-image, publish-chart are kept running, since we do not want to stop them in the middle of push step, which would leave partial state. Signed-off-by: Robert Gildein <rgildein@users.noreply.github.com>
|
Just as a note: We don't use semantic commits. ref/ https://github.com/ironcore-dev/network-operator/blob/main/AGENTS.md?plain=1#L53-L57 Also, I think merging back |
adamtrizuljak-sap
left a comment
There was a problem hiding this comment.
Both docker push and helm push should be immune to being interrupted, so I would apply the concurrency group to them as well.
The
This part I did not understand? One thing is that if two merge happened one after another to the main branch, already running workflows will be cancelled, so maybe we need to avoid it? |
Are you sure? Already pushed layers will be removed? |
Signed-off-by: Robert Gildein <rgildein@users.noreply.github.com>
a16b1f9 to
9bcc3cd
Compare
@rgildein The comment regarding semantic commits was refering to the commit message of 56ee9c8 and the title of this PR, not the changes themselves. Regarding the comment on merging back |
That's the responsibility of the image registry, not ours :) Best case, they auto-remove the layers from the failed push. Worst case, the layers remain there and subsequent pushes can reuse them. And |
Description
Add concurrency and group for all GitHub actions, the group name is composed:
github.workflow— the workflow's name: field (e.g. "Lint", "Test and Code Coverage")github.ref— the full ref of the branch or tag that triggered the run (e.g. refs/heads/feat/my-feature, refs/pull/42/merge)Actions cancelling prior runs on new push for all workflows, except if it's merged/pushed/tagged the main branch.
Expected output
With these changes I want to prevent running multiple jobs and save resources. Usually such situation happens during updating PR with current main branch or when I see failing lint and I push fix immediately.