Skip to content

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

Merged
merged 2 commits into from
Jul 15, 2025
Merged

Add tag push trigger to main workflow #12829

merged 2 commits into from
Jul 15, 2025

Conversation

silv-io
Copy link
Member

@silv-io silv-io commented Jul 3, 2025

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 and paths 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 in github.event_name, so we don't need to change that part in the pipeline.

The github.ref however changes to refs/tags/v... which is why we need to check for startsWith( github.ref, refs/tags/v' ) to determine if a triggered action is on a tagged release.

Changes

  • add a tag push trigger on all version tags (so v<major>.<minor>.<patch> where major, minor and hotfix can be arbitrary integers)
  • Adapt all workflows that are called by the main workflow or are the main workflow to include checks for tag refs in addition to master branch checks.

@silv-io silv-io added the semver: patch Non-breaking changes which can be included in patch releases label Jul 3, 2025
Copy link

github-actions bot commented Jul 3, 2025

Test Results - Preflight, Unit

21 862 tests  ±0   20 205 ✅ ±0   6m 21s ⏱️ +4s
     1 suites ±0    1 657 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit f654ca1. ± Comparison against base commit d46cf41.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 3, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 13s ⏱️ ±0s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f654ca1. ± Comparison against base commit d46cf41.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 3, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 21m 16s ⏱️
5 283 tests 4 354 ✅ 929 💤 0 ❌
5 289 runs  4 354 ✅ 935 💤 0 ❌

Results for commit f654ca1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 14, 2025

Test Results (MA/MR) - Preflight, Unit

21 862 tests   20 205 ✅  6m 19s ⏱️
     1 suites   1 657 💤
     1 files         0 ❌

Results for commit f654ca1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 14, 2025

Test Results (amd64, MA/MR) - Acceptance

7 tests   5 ✅  3m 17s ⏱️
1 suites  2 💤
1 files    0 ❌

Results for commit f654ca1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 14, 2025

Test Results (amd64, MA/MR) - Integration, Bootstrap

    5 files      5 suites   2h 21m 47s ⏱️
5 283 tests 4 354 ✅ 929 💤 0 ❌
5 289 runs  4 354 ✅ 935 💤 0 ❌

Results for commit f654ca1.

♻️ This comment has been updated with latest results.

@silv-io silv-io force-pushed the trigger-on-tag-push branch from f29e981 to f654ca1 Compare July 14, 2025 14:08
@silv-io silv-io marked this pull request as ready for review July 14, 2025 14:19
Copy link
Contributor

@k-a-il k-a-il left a 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? 🤔

@alexrashed
Copy link
Member

Good point! Tag protection rules are in place since last week, only our release automation (no one else) can push tags in this repository.

Copy link
Member

@alexrashed alexrashed left a 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?

@silv-io
Copy link
Member Author

silv-io commented Jul 15, 2025

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?

I was thinking the same thing. I think we can just remove --allow-empty from the release helper function. I'll think it through and then if I don't find anything I'll adjust it.

@silv-io silv-io merged commit 56b942c into master Jul 15, 2025
54 checks passed
@silv-io silv-io deleted the trigger-on-tag-push branch July 15, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants