Add podman-entitlement GitHub Action.#60
Open
adelton wants to merge 2 commits intoredhat-actions:mainfrom
Open
Add podman-entitlement GitHub Action.#60adelton wants to merge 2 commits intoredhat-actions:mainfrom
adelton wants to merge 2 commits intoredhat-actions:mainfrom
Conversation
Author
|
I've been playing with this approach for a while in https://github.com/adelton/redhat-entitlements because I'd need it for RHEL-based container image builds and tests of https://github.com/freeipa/freeipa-container. With RHEL 9 release this week, I updated and tested the approach to use I currently did not include any tests with this PR because
Please let me know how you'd like tests for this Action to be laid out. |
8c61d35 to
15f731b
Compare
Author
|
I've now updated the code to make it a bit more readable. |
… needed. Change was implemented in https://bugzilla.redhat.com/show_bug.cgi?id=2203096.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When building images that need Red Hat content beyond what is available in the Universal Base Image repositories, Red Hat subscription is needed. To avoid changing the Dockerfile and invoke
subscription-manager registermanually, this GitHub Actions calls that step in separate temporary container and uses/etc/containers/mounts.confto configure subsequentpodman buildinvocations to have access to the entitlements.Note that for example
registry.access.redhat.com/ubi9-minimaldoes not havesubscription-managerat all so the approach with tweaking the Dockerfile and somehow passing the subscription credentials to thepodman buildinvocation which gets sometimes recommended would not work with those minimalistic images at all.Related Issue(s)
Checklist
Changes made
podman-entitlement