-
Notifications
You must be signed in to change notification settings - Fork 1
feat(docker-build-image): support separate docker cache registry and buildKit config #648
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
base: main
Are you sure you want to change the base?
Changes from all commits
d04604b
ab9783f
a587b65
62df580
06944d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,30 @@ on: # yamllint disable-line rule:truthy | |
| default: "gha" | ||
| type: string | ||
| required: false | ||
| buildkitd-config-inline: | ||
| description: | | ||
| Inline BuildKit daemon configuration. | ||
| See https://github.com/docker/setup-buildx-action#inputs. | ||
| Example for insecure registry: | ||
| ```ini | ||
| [registry."my-registry.local:5000"] | ||
| http = true | ||
| insecure = true | ||
| ``` | ||
| type: string | ||
| required: false | ||
| cache-registry: | ||
| description: | | ||
| Optional separate registry for Docker build cache. | ||
| Use this when cache is stored on a different registry than the final image. | ||
| type: string | ||
| required: false | ||
| cache-registry-username: | ||
| description: | | ||
| Username for the cache registry. | ||
| Required if cache-registry is set and requires authentication. | ||
| type: string | ||
| required: false | ||
|
Comment on lines
+108
to
+119
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO we can provide a bettern way to define multiple registry auth using https://github.com/docker/login-action?tab=readme-ov-file#authenticate-to-multiple-registries
So we can imagine to improve oci-registry, oci-registry-username, oci-registry-password, accepting string or key:value pull:ghcr.io What do you think?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit split on this. I agree the idea is interesting and could avoid duplicating the auth inputs/secrets, especially if we want to support more registries (pull, push, cache, etc.). My main concern is the implementation complexity without introducing a breaking change. Today the inputs are simple strings, and supporting both the current format and a "key:value" style would make the parsing and validation more complex. I'm also wondering how many real use cases we’d have beyond the main registry and the cache registry introduced in this PR. |
||
| sign: | ||
| description: | | ||
| Sign built images. | ||
|
|
@@ -116,6 +140,11 @@ on: # yamllint disable-line rule:truthy | |
| GitHub App private key to generate GitHub token to be passed as build secret env. | ||
| See https://github.com/actions/create-github-app-token. | ||
| required: false | ||
| cache-registry-password: | ||
| description: | | ||
| Password for the cache registry. | ||
| Required if cache-registry is set and requires authentication. | ||
| required: false | ||
| outputs: | ||
| built-images: | ||
| description: | | ||
|
|
@@ -414,6 +443,10 @@ jobs: | |
| secret-envs: ${{ steps.prepare-secret-envs.outputs.secret-envs }} | ||
| secrets: ${{ secrets.build-secrets }} | ||
| cache-type: ${{ inputs.cache-type }} | ||
| cache-registry: ${{ inputs.cache-registry }} | ||
| cache-registry-username: ${{ inputs.cache-registry-username }} | ||
| cache-registry-password: ${{ secrets.cache-registry-password }} | ||
| buildkitd-config-inline: ${{ inputs.buildkitd-config-inline }} | ||
| multi-platform: ${{ matrix.image.multi-platform }} | ||
|
|
||
| # FIXME: Set built images infos in file to be uploaded as artifacts, because github action does not handle job outputs for matrix | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.