Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/.test-bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,15 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

bake-ghcr-image-casing:
strategy:
matrix:
include:
- variant: plain
images: ghcr.io/docker/GitHub-Builder-Test
- variant: attributes
images: |
name=registry.invalid/disabled/app,enable=false
name=ghcr.io/docker/GitHub-Builder-Test,enable=true
uses: ./.github/workflows/bake.yml
permissions:
contents: read
Expand All @@ -709,9 +718,9 @@ jobs:
*.args.VERSION={{meta.version}}
target: hello-cross
set-meta-annotations: true
meta-images: ghcr.io/docker/GitHub-Builder-Test
meta-images: ${{ matrix.images }}
meta-tags: |
type=raw,value=bake-image-casing-${{ github.run_id }}
type=raw,value=bake-image-casing-${{ matrix.variant }}-${{ github.run_id }}
secrets:
registry-auths: |
- registry: ghcr.io
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/.test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,15 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

build-ghcr-image-casing:
strategy:
matrix:
include:
- variant: plain
images: ghcr.io/docker/GitHub-Builder-Test
- variant: attributes
images: |
name=registry.invalid/disabled/app,enable=false
name=ghcr.io/docker/GitHub-Builder-Test,enable=true
uses: ./.github/workflows/build.yml
permissions:
contents: read
Expand All @@ -719,9 +728,9 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
sbom: true
set-meta-annotations: true
meta-images: ghcr.io/docker/GitHub-Builder-Test
meta-images: ${{ matrix.images }}
meta-tags: |
type=raw,value=build-image-casing-${{ github.run_id }}
type=raw,value=build-image-casing-${{ matrix.variant }}-${{ github.run_id }}
secrets:
registry-auths: |
- registry: ghcr.io
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ jobs:
const { Bake } = require('@docker/github-builder-runtime/lib/buildx/bake');
const { Build } = require('@docker/github-builder-runtime/lib/buildx/build');
const { GitHub } = require('@docker/github-builder-runtime/lib/github/github');
const { MetaImages } = require('@docker/github-builder-runtime/lib/github-builder/meta-images');
const { RunnerMapping } = require('@docker/github-builder-runtime/lib/github-builder/runner-mapping');
const { BakeTargets } = require('@docker/github-builder-runtime/lib/github-builder/bake-targets');
const { BakeVars } = require('@docker/github-builder-runtime/lib/github-builder/bake-vars');
Expand Down Expand Up @@ -413,7 +414,7 @@ jobs:
}).sort(), null, 2));
});

const metaImages = inpMetaImages.map(image => image.toLowerCase());
const metaImages = MetaImages.resolve(inpMetaImages);
await core.group(`Set metaImages output`, async () => {
core.info(JSON.stringify(metaImages, null, 2));
core.setOutput('metaImages', metaImages.join('\n'));
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ jobs:
with:
script: |
const { GitHub } = require('@docker/github-builder-runtime/lib/github/github');
const { MetaImages } = require('@docker/github-builder-runtime/lib/github-builder/meta-images');
const { RunnerMapping } = require('@docker/github-builder-runtime/lib/github-builder/runner-mapping');
const { Util } = require('@docker/github-builder-runtime/lib/util');

Expand Down Expand Up @@ -399,7 +400,7 @@ jobs:
core.setOutput('proxyNetwork', proxyNetwork);
});

const metaImages = inpMetaImages.map(image => image.toLowerCase());
const metaImages = MetaImages.resolve(inpMetaImages);
await core.group(`Set metaImages output`, async () => {
core.info(JSON.stringify(metaImages, null, 2));
core.setOutput('metaImages', metaImages.join('\n'));
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ jobs:
| `ulimit` | List | | [Ulimit](https://docs.docker.com/engine/reference/commandline/buildx_build/#ulimit) options (e.g., `nofile=1024:1024`) |
| `set-meta-annotations` | Bool | `false` | Append OCI Image Format Specification annotations generated by `docker/metadata-action` |
| `set-meta-labels` | Bool | `false` | Append OCI Image Format Specification labels generated by `docker/metadata-action` |
| `meta-images` | List | | [List of images](https://github.com/docker/metadata-action?tab=readme-ov-file#images-input) to use as base name for tags (required for image output) |
| `meta-images` | List | | List of image names or `name=...,enable=...` entries (required for image output). Disabled entries are excluded from exports, signing, and manifests. |
| `meta-tags` | List | | [List of tags](https://github.com/docker/metadata-action?tab=readme-ov-file#tags-input) as key-value pair attributes |
| `meta-labels` | List | | [List of custom labels](https://github.com/docker/metadata-action?tab=readme-ov-file#overwrite-labels-and-annotations) |
| `meta-annotations` | List | | [List of custom annotations](https://github.com/docker/metadata-action?tab=readme-ov-file#overwrite-labels-and-annotations) |
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
| `vars` | List | | [Variables](https://docs.docker.com/build/bake/variables/) to set in the Bake definition as list of key-value pair |
| `set-meta-annotations` | Bool | `false` | Append OCI Image Format Specification annotations generated by `docker/metadata-action` |
| `set-meta-labels` | Bool | `false` | Append OCI Image Format Specification labels generated by `docker/metadata-action` |
| `meta-images` | List | | [List of images](https://github.com/docker/metadata-action?tab=readme-ov-file#images-input) to use as base name for tags (required for image output) |
| `meta-images` | List | | List of image names or `name=...,enable=...` entries (required for image output). Disabled entries are excluded from exports, signing, and manifests. |
| `meta-tags` | List | | [List of tags](https://github.com/docker/metadata-action?tab=readme-ov-file#tags-input) as key-value pair attributes |
| `meta-labels` | List | | [List of custom labels](https://github.com/docker/metadata-action?tab=readme-ov-file#overwrite-labels-and-annotations) |
| `meta-annotations` | List | | [List of custom annotations](https://github.com/docker/metadata-action?tab=readme-ov-file#overwrite-labels-and-annotations) |
Expand Down
Loading