Skip to content

Commit fbd6fb4

Browse files
committed
switch sbom input type from string to boolean
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent dc9af42 commit fbd6fb4

3 files changed

Lines changed: 53 additions & 51 deletions

File tree

.github/workflows/bake.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ on:
4242
required: false
4343
default: false
4444
sbom:
45-
type: string
45+
type: boolean
4646
description: "Generate SBOM attestation for the build"
4747
required: false
48+
default: false
4849
set:
4950
type: string
5051
description: "List of targets values to override (eg. targetpattern.key=value)"
@@ -176,7 +177,7 @@ jobs:
176177
const inpFiles = Util.getInputList('files');
177178
const inpOutput = core.getInput('output');
178179
const inpPush = core.getBooleanInput('push');
179-
const inpSbom = core.getInput('sbom');
180+
const inpSbom = core.getBooleanInput('sbom');
180181
const inpSet = Util.getInputList('set', {ignoreComma: true, quote: false});
181182
const inpSign = core.getInput('sign');
182183
const inpTarget = core.getInput('target');
@@ -220,7 +221,7 @@ jobs:
220221
def = await bake.getDefinition({
221222
files: inpFiles,
222223
overrides: inpSet,
223-
sbom: inpSbom,
224+
sbom: inpSbom ? 'true' : 'false',
224225
source: bakeSource,
225226
targets: [inpTarget],
226227
githubToken: inpGitHubToken
@@ -376,7 +377,7 @@ jobs:
376377
const inpFiles = Util.getInputList('files');
377378
const inpOutput = core.getInput('output');
378379
const inpPush = core.getBooleanInput('push');
379-
const inpSbom = core.getInput('sbom');
380+
const inpSbom = core.getBooleanInput('sbom');
380381
const inpSet = Util.getInputList('set', {ignoreComma: true, quote: false});
381382
const inpTarget = core.getInput('target');
382383
const inpMetaImages = core.getMultilineInput('meta-images');
@@ -400,7 +401,7 @@ jobs:
400401
const def = await bake.getDefinition({
401402
files: inpFiles,
402403
overrides: inpSet,
403-
sbom: inpSbom,
404+
sbom: inpSbom ? 'true' : 'false',
404405
source: bakeSource,
405406
targets: [inpTarget],
406407
githubToken: inpGitHubToken

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ on:
5858
required: false
5959
default: false
6060
sbom:
61-
type: string
61+
type: boolean
6262
description: "Generate SBOM attestation for the build"
6363
required: false
64+
default: false
6465
shm-size:
6566
type: string
6667
description: "Size of /dev/shm (e.g., 2g)"

0 commit comments

Comments
 (0)