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
24 changes: 24 additions & 0 deletions .github/workflows/.test-bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,3 +621,27 @@ jobs:
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

bake-ghcr-image-casing:
uses: ./.github/workflows/bake.yml
permissions:
contents: read
id-token: write
packages: write
with:
context: test
output: image
push: ${{ github.event_name != 'pull_request' }}
sbom: true
set: |
*.args.VERSION={{meta.version}}
target: hello-cross
set-meta-annotations: true
meta-images: ghcr.io/docker/GitHub-Builder-Test
meta-tags: |
type=raw,value=bake-image-casing-${{ github.run_id }}
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/.test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -640,3 +640,27 @@ jobs:
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

build-ghcr-image-casing:
uses: ./.github/workflows/build.yml
permissions:
contents: read
id-token: write
packages: write
with:
build-args: |
VERSION={{meta.version}}
file: test/hello.Dockerfile
output: image
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
sbom: true
set-meta-annotations: true
meta-images: ghcr.io/docker/GitHub-Builder-Test
meta-tags: |
type=raw,value=build-image-casing-${{ github.run_id }}
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
19 changes: 14 additions & 5 deletions .github/workflows/bake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
includes: ${{ steps.set.outputs.includes }}
metaImages: ${{ steps.set.outputs.metaImages }}
sign: ${{ steps.set.outputs.sign }}
ghaCacheSign: ${{ steps.set.outputs.ghaCacheSign }}
steps:
Expand Down Expand Up @@ -251,6 +252,7 @@ jobs:
INPUT_SBOM-IMAGE: ${{ env.SBOM_IMAGE }}
INPUT_MATRIX-SIZE-LIMIT: ${{ env.MATRIX_SIZE_LIMIT }}
INPUT_ACTIONS-ID-TOKEN-SET: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN != '' && env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}
INPUT_META-IMAGES: ${{ inputs.meta-images }}
INPUT_RUNNER: ${{ inputs.runner }}
INPUT_DISTRIBUTE: ${{ inputs.distribute }}
INPUT_ARTIFACT-UPLOAD: ${{ inputs.artifact-upload }}
Expand All @@ -275,6 +277,7 @@ jobs:
const inpSbomImage = core.getInput('sbom-image');
const inpMatrixSizeLimit = parseInt(core.getInput('matrix-size-limit'), 10);
const inpActionsIdTokenSet = core.getBooleanInput('actions-id-token-set');
const inpMetaImages = core.getMultilineInput('meta-images');

const inpRunner = core.getInput('runner');
const inpDistribute = core.getBooleanInput('distribute');
Expand Down Expand Up @@ -337,6 +340,12 @@ jobs:
core.info(JSON.stringify(envs, null, 2));
});

const metaImages = inpMetaImages.map(image => image.toLowerCase());
await core.group(`Set metaImages output`, async () => {
core.info(JSON.stringify(metaImages, null, 2));
core.setOutput('metaImages', metaImages.join('\n'));
});

let def;
let target;
try {
Expand Down Expand Up @@ -494,7 +503,7 @@ jobs:
if: ${{ inputs.output == 'image' }}
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ inputs.meta-images }}
images: ${{ needs.prepare.outputs.metaImages }}
tags: ${{ inputs.meta-tags }}
flavor: ${{ inputs.meta-flavor }}
labels: ${{ inputs.meta-labels }}
Expand Down Expand Up @@ -632,7 +641,7 @@ jobs:
INPUT_SET: ${{ inputs.set }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_VARS: ${{ inputs.vars }}
INPUT_META-IMAGES: ${{ inputs.meta-images }}
INPUT_META-IMAGES: ${{ needs.prepare.outputs.metaImages }}
INPUT_META-VERSION: ${{ steps.meta.outputs.version }}
INPUT_META-TAGS: ${{ steps.meta.outputs.tags }}
INPUT_SET-META-ANNOTATIONS: ${{ inputs.set-meta-annotations }}
Expand Down Expand Up @@ -826,7 +835,7 @@ jobs:
if: ${{ needs.prepare.outputs.sign == 'true' && inputs.output == 'image' }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
INPUT_IMAGE-NAMES: ${{ inputs.meta-images }}
INPUT_IMAGE-NAMES: ${{ needs.prepare.outputs.metaImages }}
INPUT_IMAGE-DIGEST: ${{ steps.get-image-digest.outputs.digest }}
with:
script: |
Expand Down Expand Up @@ -958,7 +967,7 @@ jobs:
if: ${{ inputs.output == 'image' }}
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ inputs.meta-images }}
images: ${{ needs.prepare.outputs.metaImages }}
tags: ${{ inputs.meta-tags }}
flavor: ${{ inputs.meta-flavor }}
labels: ${{ inputs.meta-labels }}
Expand Down Expand Up @@ -988,7 +997,7 @@ jobs:
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
INPUT_PUSH: ${{ inputs.push }}
INPUT_IMAGE-NAMES: ${{ inputs.meta-images }}
INPUT_IMAGE-NAMES: ${{ needs.prepare.outputs.metaImages }}
INPUT_TAG-NAMES: ${{ steps.meta.outputs.tag-names }}
INPUT_BUILD-OUTPUTS: ${{ toJSON(needs.build.outputs) }}
INPUT_SET-META-ANNOTATIONS: ${{ inputs.set-meta-annotations }}
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
includes: ${{ steps.set.outputs.includes }}
metaImages: ${{ steps.set.outputs.metaImages }}
sign: ${{ steps.set.outputs.sign }}
privateRepo: ${{ steps.set.outputs.privateRepo }}
ghaCacheSign: ${{ steps.set.outputs.ghaCacheSign }}
Expand Down Expand Up @@ -246,6 +247,7 @@ jobs:
env:
INPUT_MATRIX-SIZE-LIMIT: ${{ env.MATRIX_SIZE_LIMIT }}
INPUT_ACTIONS-ID-TOKEN-SET: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN != '' && env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}
INPUT_META-IMAGES: ${{ inputs.meta-images }}
INPUT_RUNNER: ${{ inputs.runner }}
INPUT_DISTRIBUTE: ${{ inputs.distribute }}
INPUT_ARTIFACT-UPLOAD: ${{ inputs.artifact-upload }}
Expand All @@ -260,6 +262,7 @@ jobs:

const inpMatrixSizeLimit = parseInt(core.getInput('matrix-size-limit'), 10);
const inpActionsIdTokenSet = core.getBooleanInput('actions-id-token-set');
const inpMetaImages = core.getMultilineInput('meta-images');

const inpRunner = core.getInput('runner');
const inpDistribute = core.getBooleanInput('distribute');
Expand Down Expand Up @@ -304,6 +307,12 @@ jobs:
core.info(`privateRepo: ${privateRepo}`);
core.setOutput('privateRepo', privateRepo);
});

const metaImages = inpMetaImages.map(image => image.toLowerCase());
await core.group(`Set metaImages output`, async () => {
core.info(JSON.stringify(metaImages, null, 2));
core.setOutput('metaImages', metaImages.join('\n'));
});

await core.group(`Set includes output`, async () => {
let includes = [];
Expand Down Expand Up @@ -387,7 +396,7 @@ jobs:
if: ${{ inputs.output == 'image' }}
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ inputs.meta-images }}
images: ${{ needs.prepare.outputs.metaImages }}
tags: ${{ inputs.meta-tags }}
flavor: ${{ inputs.meta-flavor }}
labels: ${{ inputs.meta-labels }}
Expand Down Expand Up @@ -526,7 +535,7 @@ jobs:
INPUT_PUSH: ${{ inputs.push }}
INPUT_SBOM: ${{ inputs.sbom }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_META-IMAGES: ${{ inputs.meta-images }}
INPUT_META-IMAGES: ${{ needs.prepare.outputs.metaImages }}
INPUT_META-VERSION: ${{ steps.meta.outputs.version }}
INPUT_META-TAGS: ${{ steps.meta.outputs.tags }}
INPUT_SET-META-ANNOTATIONS: ${{ inputs.set-meta-annotations }}
Expand Down Expand Up @@ -681,7 +690,7 @@ jobs:
if: ${{ needs.prepare.outputs.sign == 'true' && inputs.output == 'image' }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
INPUT_IMAGE-NAMES: ${{ inputs.meta-images }}
INPUT_IMAGE-NAMES: ${{ needs.prepare.outputs.metaImages }}
INPUT_IMAGE-DIGEST: ${{ steps.build.outputs.digest }}
with:
script: |
Expand Down Expand Up @@ -813,7 +822,7 @@ jobs:
if: ${{ inputs.output == 'image' }}
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ inputs.meta-images }}
images: ${{ needs.prepare.outputs.metaImages }}
tags: ${{ inputs.meta-tags }}
flavor: ${{ inputs.meta-flavor }}
labels: ${{ inputs.meta-labels }}
Expand Down Expand Up @@ -842,7 +851,7 @@ jobs:
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
INPUT_PUSH: ${{ inputs.push }}
INPUT_IMAGE-NAMES: ${{ inputs.meta-images }}
INPUT_IMAGE-NAMES: ${{ needs.prepare.outputs.metaImages }}
INPUT_TAG-NAMES: ${{ steps.meta.outputs.tag-names }}
INPUT_BUILD-OUTPUTS: ${{ toJSON(needs.build.outputs) }}
INPUT_ANNOTATIONS: ${{ inputs.annotations }}
Expand Down
Loading