Skip to content

Commit 0f61c6c

Browse files
committed
add artifact-name input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent f3bf948 commit 0f61c6c

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/.test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ jobs:
184184
id-token: write
185185
with:
186186
output: ${{ github.event_name != 'pull_request' && 'local' || 'cacheonly' }}
187+
artifact-name: build-output
187188
build-file: test/hello.Dockerfile
188189
build-sbom: true
189190
build-platforms: linux/amd64,linux/arm64
@@ -283,6 +284,7 @@ jobs:
283284
context: test
284285
target: hello-cross
285286
output: ${{ github.event_name != 'pull_request' && 'local' || 'cacheonly' }}
287+
artifact-name: bake-output
286288
bake-sbom: true
287289

288290
bake-local-verify:

.github/workflows/bake.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
description: "Build output destination (one of cacheonly, registry, local)"
1919
default: 'cacheonly'
2020
required: false
21+
artifact-name:
22+
type: string
23+
description: "Name of the uploaded artifact (for local output)"
24+
required: false
25+
default: 'docker-github-builder-assets'
2126
envs:
2227
type: string
2328
description: "Environment variables to set"
@@ -121,15 +126,14 @@ env:
121126
DOCKER_ACTIONS_TOOLKIT_MODULE: "@docker/actions-toolkit@0.67.0"
122127
COSIGN_VERSION: "v3.0.2"
123128
LOCAL_EXPORT_DIR: "/tmp/buildx-output"
124-
LOCAL_ARTIFACT_NAME: "docker-github-builder-assets"
125129

126130
jobs:
127131
build:
128132
runs-on: ubuntu-latest
129133
outputs:
130134
cosign-version: ${{ env.COSIGN_VERSION }}
131135
cosign-verify-commands: ${{ steps.signing-attestation-manifests.outputs.verify-commands || steps.signing-local-artifacts.outputs.verify-commands }}
132-
artifact-name: ${{ env.LOCAL_ARTIFACT_NAME }}
136+
artifact-name: ${{ inputs.artifact-name }}
133137
permissions:
134138
contents: read
135139
id-token: write # needed for signing the images with GitHub OIDC Token
@@ -445,6 +449,6 @@ jobs:
445449
if: ${{ inputs.output == 'local' }}
446450
uses: actions/upload-artifact@v5
447451
with:
448-
name: ${{ env.LOCAL_ARTIFACT_NAME }}
452+
name: ${{ inputs.artifact-name }}
449453
path: ${{ env.LOCAL_EXPORT_DIR }}
450454
if-no-files-found: error

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
description: "Build output destination (one of cacheonly, registry, local)"
99
default: 'cacheonly'
1010
required: false
11+
artifact-name:
12+
type: string
13+
description: "Name of the uploaded artifact (for local output)"
14+
required: false
15+
default: 'docker-github-builder-assets'
1116
cache:
1217
type: boolean
1318
description: "Enable cache to GitHub Actions cache backend"
@@ -123,15 +128,14 @@ env:
123128
DOCKER_ACTIONS_TOOLKIT_MODULE: "@docker/actions-toolkit@0.67.0"
124129
COSIGN_VERSION: "v3.0.2"
125130
LOCAL_EXPORT_DIR: "/tmp/buildx-output"
126-
LOCAL_ARTIFACT_NAME: "docker-github-builder-assets"
127131

128132
jobs:
129133
build:
130134
runs-on: ubuntu-latest
131135
outputs:
132136
cosign-version: ${{ env.COSIGN_VERSION }}
133137
cosign-verify-commands: ${{ steps.signing-attestation-manifests.outputs.verify-commands || steps.signing-local-artifacts.outputs.verify-commands }}
134-
artifact-name: ${{ env.LOCAL_ARTIFACT_NAME }}
138+
artifact-name: ${{ inputs.artifact-name }}
135139
permissions:
136140
contents: read
137141
id-token: write # needed for signing the images with GitHub OIDC Token
@@ -379,6 +383,6 @@ jobs:
379383
if: ${{ inputs.output == 'local' }}
380384
uses: actions/upload-artifact@v5
381385
with:
382-
name: ${{ env.LOCAL_ARTIFACT_NAME }}
386+
name: ${{ inputs.artifact-name }}
383387
path: ${{ env.LOCAL_EXPORT_DIR }}
384388
if-no-files-found: error

0 commit comments

Comments
 (0)