-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add tag push trigger to main workflow #12829
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
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 21m 16s ⏱️ Results for commit f654ca1. ♻️ This comment has been updated with latest results. |
Test Results (MA/MR) - Preflight, Unit21 862 tests 20 205 ✅ 6m 19s ⏱️ Results for commit f654ca1. ♻️ This comment has been updated with latest results. |
Test Results (amd64, MA/MR) - Acceptance7 tests 5 ✅ 3m 17s ⏱️ Results for commit f654ca1. ♻️ This comment has been updated with latest results. |
Test Results (amd64, MA/MR) - Integration, Bootstrap 5 files 5 suites 2h 21m 47s ⏱️ Results for commit f654ca1. ♻️ This comment has been updated with latest results. |
f29e981
to
f654ca1
Compare
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.
Nice work 🚀
Just wanted to add, that this change could potentially enable collaborators to release from any branch. Before we merge, can we double-check if tag protection rules are already in place and that only certain users can push tags? 🤔
Good point! Tag protection rules are in place since last week, only our release automation (no one else) can push tags in this repository. |
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.
Awesome! Thanks a lot for fixing this issue after the pipeline migration!
Do you think it would also be possible to adjust our release workflow (which is in our pro repo) such that this empty commit is not even created in the first place anymore?
Or would this need something else still?
I was thinking the same thing. I think we can just remove |
Motivation
We use an empty commit + a version tag to mark the release of new versions in PyPI and DockerHub. The empty commit triggered the run in CircleCI
Since switching to GitHub Actions for our CI, the empty commit does not do that anymore because of the path specifiers. However, we can use tag pushes instead to trigger the CI + push jobs.
In a separate repo, I've checked how this would behave:
Having both
tags
andpaths
patterns in a workflow does not interfere with each other. That means that pushed tags will trigger the CI regardless of which files were changed in the commit that the tag points to.Furthermore, a tag push event still has the same name of
push
ingithub.event_name
, so we don't need to change that part in the pipeline.The
github.ref
however changes torefs/tags/v...
which is why we need to check forstartsWith( github.ref, refs/tags/v' )
to determine if a triggered action is on a tagged release.Changes
v<major>.<minor>.<patch>
where major, minor and hotfix can be arbitrary integers)