-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ci: run CICD workflow on tag creation #5971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Great! However, it should be narrowed to tags only. Looking at the docs you linked I think something like this should be used
But there's also the release event, which might be even better: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release |
This would prevent the workflow from running on pushes to main (after a PR is merged). I think the release event is triggered when publishing a release (not a tag). |
Maybe we can do:
I don't see any examples of that in the docs but also nothing that says that's not possible? This particular example might not be valid yaml, but something like it should be possible right?
I don't understand this part. Can't we just make a release that will trigger the CI? |
This should be:
To support push on both branches and tags |
Understanding the docs correctly is really hard. After reading them again, I agree with @piotrkwiecinski. This is also shown in the example here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-branches-and-tags Adding two separate push triggers as suggested by @tertsdiepraam does not work, since this a JSON/YAML object and would result in duplicate keys.
Currently, the release engineer pushes the tag, that triggers the workflow, the workflow creates a draft release. |
Fixes 4d2bdf4. For a release to be triggered, the workflow has to run with GITHUB_REF=refs/tags/X.Y.Z, which was disabled by limiting the push trigger to a branch.
Yeah, they aren't great :(
We have can create a release in the GitHub UI. I was thinking that could trigger the CI for and attach the artifacts to the release, but I'm happy with the current version if it works. |
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.
It's at least worth it to test this :)
Thanks everyone :) |
Fixes 4d2bdf4. For a release to be triggered, the workflow has to run with GITHUB_REF=refs/tags/X.Y.Z, which was disabled by limiting the push trigger to a branch.
Please note that the tag filter
v*.*.*
does not work since releases are tagged like0.0.24
.This will create extra runs in case branches are created in the uutls/coreutils repo.I think this is an acceptable tradeoff.
See also: