Skip to content
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

Publish containers tagged with version created by uci releaser #794

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

masih
Copy link
Member

@masih masih commented Dec 13, 2024

This repository started using unified CI (uci) a while back to make tagged releases. This release mechanism is triggered by editing the version.json which in turn triggers a CI workflow to make a tagged release along with ghithub release etc.

The issue with this approach is that because the tag is created by CI it does not trigger other CI jobs that listen to tags: ['v*'] events. Therefore, since the switch we have only been publishing containers tagged with main.

The changes here resolve this issue by triggering the GHCR publish workflow whenever releaser wrokflow succeeds. It then fishes out the ref produced by the releaser workflow to use as tagging. This will then give us containers tagged by whatever release we make using uci releaser workflow.

Additionally, it adds type=sha,format=long tagging to containers for easier debugging and deployment of an explicit commit to main.

@masih masih requested review from rvagg and rjan90 December 13, 2024 09:58
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.30%. Comparing base (1b17c6c) to head (5b8ecad).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
- Coverage   69.64%   69.30%   -0.35%     
==========================================
  Files          77       77              
  Lines        7900     7900              
==========================================
- Hits         5502     5475      -27     
- Misses       1949     1970      +21     
- Partials      449      455       +6     

see 4 files with indirect coverage changes

This repository started using unified CI (uci) a while back to make
tagged releases. This release mechanism is triggered by editing the
`version.json` which in turn triggers a CI workflow to make a tagged
release along with ghithub release etc.

The issue with this approach is that because the tag is created by CI it
does not trigger other CI jobs that listen to `tags: ['v*']` events.
Therefore, since the switch we have only been publishing containers
tagged with `main`.

The changes here resolve this issue by triggering the GHCR publish
workflow whenever releaser wrokflow succeeds. It then fishes out the ref
produced by the releaser workflow to use as tagging. This will then give
us containers tagged by whatever release we make using uci releaser
workflow.

Additionally, it adds `type=sha,format=long` tagging to containers for
easier debugging and deployment of an explicit commit to `main`.
@masih masih force-pushed the masih/ghcr-publish-on-releaser branch from 2bd15a0 to 5b8ecad Compare December 13, 2024 10:37
@masih masih enabled auto-merge December 13, 2024 10:38
@masih masih added this pull request to the merge queue Dec 13, 2024
Merged via the queue into main with commit fdd8d53 Dec 13, 2024
14 checks passed
@masih masih deleted the masih/ghcr-publish-on-releaser branch December 13, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants