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

ci: push container images to ghcr.io as well #3658

Merged
merged 7 commits into from
Nov 13, 2024

Conversation

dulltz
Copy link
Contributor

@dulltz dulltz commented Oct 23, 2024

What this PR does / why we need it:
Add GHCR as a destination container registry.
With this change we will be able to pull the container at the following URI:

  • ghcr.io/openpolicyanget/gatekeeper
  • ghcr.io/openpolicyanget/gatekeeper-crds
  • ghcr.io/openpolicyanget/gator

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #3652

Special notes for your reviewer:
After merging this PR, container images will appear in Packages section.
2024-10-23 15 18 06

@dulltz dulltz force-pushed the feature/release-to-ghcr branch 2 times, most recently from d13fc9d to 8a082f4 Compare October 23, 2024 04:55
@dulltz dulltz marked this pull request as ready for review October 23, 2024 05:03
@dulltz dulltz requested a review from a team as a code owner October 23, 2024 05:03
@dulltz dulltz marked this pull request as draft October 23, 2024 05:06
@dulltz dulltz force-pushed the feature/release-to-ghcr branch 2 times, most recently from f29dedb to 6148782 Compare October 23, 2024 05:46
@dulltz dulltz force-pushed the feature/release-to-ghcr branch from 6148782 to 0804e02 Compare October 23, 2024 05:47
@dulltz dulltz marked this pull request as ready for review October 23, 2024 05:48
- name: Build and push ghcr.io/${{ env.IMAGE_REPO }}
if: steps.check-ghcr-image.outputs.exists == 'false'
run: |
make REPOSITORY=ghcr.io/${{ env.IMAGE_REPO }} docker-buildx-release \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you integrate this into the existing release and pre-release flows so artifacts don't get rebuild and digests will be same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I'll give it a try and update the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sozercan I have made corrections based on the review comment. d1e8d7b

@dulltz dulltz requested a review from sozercan October 24, 2024 05:52
@sozercan sozercan force-pushed the feature/release-to-ghcr branch from 6a16cef to a7c5d95 Compare November 13, 2024 21:35
Signed-off-by: Sertac Ozercan <[email protected]>

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-22.04"
permissions:
contents: write
packages: write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dulltz pushed a change to mainly move packages permission here

Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.57%. Comparing base (3350319) to head (000dd40).
Report is 189 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (3350319) and HEAD (000dd40). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (000dd40)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3658      +/-   ##
==========================================
- Coverage   54.49%   47.57%   -6.93%     
==========================================
  Files         134      236     +102     
  Lines       12329    19786    +7457     
==========================================
+ Hits         6719     9413    +2694     
- Misses       5116     9487    +4371     
- Partials      494      886     +392     
Flag Coverage Δ
unittests 47.57% <ø> (-6.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sozercan sozercan merged commit 649980c into open-policy-agent:master Nov 13, 2024
18 of 19 checks passed
@dulltz dulltz deleted the feature/release-to-ghcr branch November 14, 2024 01:07
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.

Publish Docker Images to Additional Registries (e.g., ghcr.io) Due to Docker Hub Rate Limits
3 participants