Skip to content

Commit

Permalink
bake: fix attest disabled attribute
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jan 21, 2025
1 parent ed5ad08 commit 4b68aa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/.fixtures/bake-03-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "provenance"
},
{
"disabled": "true",
"disabled": true,
"type": "sbom"
}
],
Expand Down
3 changes: 3 additions & 0 deletions src/buildx/bake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ export class Bake {
case 'type':
attestEntry.type = value;
break;
case 'disabled':
attestEntry.disabled = Util.parseBool(value);
break;
default:
attestEntry[key] = value;
}
Expand Down
3 changes: 2 additions & 1 deletion src/types/buildx/bake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export interface Target {

export interface AttestEntry {
type: string;
[key: string]: string;
disabled?: string | boolean;
[key: string]: string | boolean | undefined;
}

export interface CacheEntry {
Expand Down

0 comments on commit 4b68aa8

Please sign in to comment.