@@ -30,7 +30,7 @@ Shared action to configure Docker tooling and OCI registry authentication.
3030## Usage
3131
3232```` yaml
33- - uses : hoverkraft-tech/ci-github-container/actions/docker/setup@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6
33+ - uses : hoverkraft-tech/ci-github-container/actions/docker/setup@c84014f56f57f8abe320ffa48adccbb997681550 # feat/docker-upgrade-buildkit-buildx
3434 with :
3535 # OCI registry configuration used to pull, push and cache images.
3636 # Accepts either a registry hostname string (default format) or a JSON object.
@@ -73,30 +73,54 @@ Shared action to configure Docker tooling and OCI registry authentication.
7373
7474# # Inputs
7575
76- | **Input** | **Description** | **Required** | **Default** |
77- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- |
78- | **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **true** | `ghcr.io` |
79- | | Accepts either a registry hostname string (default format) or a JSON object. | | |
80- | | JSON example : ` {"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` | | |
81- | **`oci-registry-username`** | Username configuration used to log against OCI registries. | **false** | - |
82- | | Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. | | |
83- | **`oci-registry-password`** | Password or personal access token configuration used to log against OCI registries. | **false** | - |
84- | | Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. | | |
85- | **`buildkitd-config-inline`** | Inline BuildKit daemon configuration. | **false** | - |
86- | | See <https://github.com/docker/setup-buildx-action#inputs>. | | |
87- | | Example for insecure registry : | | |
88- | | ```ini
89- [registry."my-registry.local:5000"]
90- http = true
91- insecure = true
92- ` ` ` | | |
93- | **` built-images`** | Optional built images payload used to resolve manifest publication registries. | **false** | - |
94- | | When provided, registry authentication targets are inferred from the built image data. | | |
95- | **`setup-buildx`** | Whether to install and configure Docker Buildx. | **false** | `true` |
76+ | **Input** | **Description** | **Required** | **Default** |
77+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | ----------- |
78+ | **`oci-registry`** | OCI registry configuration used to pull, push and cache images. | **true** | `ghcr.io` |
79+ | | Accepts either a registry hostname string (default format) or a JSON object. | | |
80+ | | JSON example : ` {"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}` | | |
81+ | **`oci-registry-username`** | Username configuration used to log against OCI registries. | **false** | - |
82+ | | Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`. | | |
83+ | **`oci-registry-password`** | Password or personal access token configuration used to log against OCI registries. | **false** | - |
84+ | | Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`. | | |
85+ | **`buildkitd-config-inline`** | Inline BuildKit daemon configuration. | **false** | - |
86+ | | See <https://github.com/docker/setup-buildx-action#inputs>. | | |
87+ | | Example for insecure registry : | | |
88+ | | <!-- textlint-disable --><pre lang="ini">[registry."my-registry.local:5000"] http = true insecure = true</pre><!-- textlint-enable --> | | |
89+ | **`built-images`** | Optional built images payload used to resolve manifest publication registries. | **false** | - |
90+ | | When provided, registry authentication targets are inferred from the built image data. | | |
91+ | **`setup-buildx`** | Whether to install and configure Docker Buildx. | **false** | `true` |
9692
9793<!-- inputs:end -->
94+
95+ # ## Multiple registries
96+
97+ The default single-registry format still works :
98+
99+ ` ` ` yaml
100+ oci-registry: ghcr.io
101+ oci-registry-username: ${{ github.repository_owner }}
102+ oci-registry-password: ${{ github.token }}
103+ ` ` `
104+
105+ To configure distinct pull, push and cache registries, pass JSON objects :
106+
107+ ` ` ` yaml
108+ oci-registry: |
109+ {"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}
110+ oci-registry-username: |
111+ {"pull:private":"${{ github.repository_owner }}","push":"${{ github.repository_owner }}"}
112+ oci-registry-password: |
113+ {"pull:private":"${{ github.token }}","push":"${{ github.token }}"}
114+ ` ` `
115+
116+ Registry credentials are resolved by role using the same keys as `oci-registry`.
117+ ` pull` is the default pull registry, while `pull:<name>` can be repeated for additional pull registries.
118+ When no pull registry is provided, the push registry is also used for pulls.
119+ Optional pull registries without credentials are skipped, which is useful for public registries such as Docker Hub.
120+
98121<!-- secrets:start -->
99122<!-- secrets:end -->
123+
100124<!-- outputs:start -->
101125
102126# # Outputs
0 commit comments