Skip to content

Commit 6ea859b

Browse files
committed
feat(docker): upgrade buildkit and buildx
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 3a12532 commit 6ea859b

8 files changed

Lines changed: 161 additions & 166 deletions

File tree

.github/workflows/docker-build-images.md

Lines changed: 41 additions & 45 deletions
Large diffs are not rendered by default.

.github/workflows/docker-build-images.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ on: # yamllint disable-line rule:truthy
109109
Inline BuildKit daemon configuration.
110110
See https://github.com/docker/setup-buildx-action#inputs.
111111
Example for insecure registry:
112-
```ini
113-
[registry."my-registry.local:5000"]
114-
http = true
115-
insecure = true
116-
```
112+
```ini
113+
[registry."my-registry.local:5000"]
114+
http = true
115+
insecure = true
116+
```
117117
type: string
118118
required: false
119119
sign:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ npm-audit-fix: ## Execute npm audit fix
3333

3434
ci: ## Execute CI tasks
3535
$(MAKE) npm-audit-fix
36-
$(MAKE) lint
36+
$(MAKE) lint-fix
3737

3838
test-build-application: ## Build the test application image
3939
@docker buildx build \

actions/docker/build-image/README.md

Lines changed: 52 additions & 82 deletions
Large diffs are not rendered by default.

actions/docker/build-image/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ inputs:
106106
Inline BuildKit daemon configuration.
107107
See https://github.com/docker/setup-buildx-action#inputs.
108108
Example for insecure registry:
109-
```ini
110-
[registry."my-registry.local:5000"]
111-
http = true
112-
insecure = true
113-
```
109+
```ini
110+
[registry."my-registry.local:5000"]
111+
http = true
112+
insecure = true
113+
```
114114
required: false
115115
multi-platform:
116116
description: |

actions/docker/setup/README.md

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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"]&#13; http = true&#13; 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

actions/docker/setup/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ inputs:
3030
Inline BuildKit daemon configuration.
3131
See https://github.com/docker/setup-buildx-action#inputs.
3232
Example for insecure registry:
33-
```ini
34-
[registry."my-registry.local:5000"]
35-
http = true
36-
insecure = true
37-
```
33+
```ini
34+
[registry."my-registry.local:5000"]
35+
http = true
36+
insecure = true
37+
```
3838
built-images:
3939
description: |
4040
Optional built images payload used to resolve manifest publication registries.
@@ -393,10 +393,10 @@ runs:
393393
id: setup-buildx
394394
with:
395395
# FIXME: upgrade version when available (https://github.com/docker/buildx/releases)
396-
version: v0.31.1
396+
version: v0.32.1
397397
# FIXME: upgrade version when available (https://hub.docker.com/r/moby/buildkit)
398398
driver-opts: |
399-
image=moby/buildkit:v0.27.0
399+
image=moby/buildkit:v0.28.0
400400
buildkitd-config-inline: ${{ inputs.buildkitd-config-inline }}
401401

402402
- if: steps.resolve-oci-registries.outputs.has-registry-auth == 'true'

actions/helm/generate-docs/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)