Skip to content

Commit 775221a

Browse files
Merge pull request #32 from WitoDelnat/add-save-tag
2 parents 6f9796e + b64c665 commit 775221a

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ This action needs a Depot API token to communicate with your project's builders.
9191
| `lint` | Bool | Lint dockerfiles and fail build if any issues are of `error` severity. (default `false`) |
9292
| `lint-fail-on` | String | Severity of linter issue to cause the build to fail. (`error`, `warn`, `info`, `none`) |
9393
| `save` | Boolean | Save the image to the Depot ephemeral registry (for use with the [depot/pull-action](https://github.com/depot/pull-action)) |
94+
| `save-tag` | String | Additional custom tag for the saved image, use with --save |
9495

9596
### General inputs
9697

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ inputs:
5252
description: 'Save the image to the Depot ephemeral registry'
5353
required: false
5454
default: 'false'
55+
save-tag:
56+
description: 'Additional custom tag for the saved image, use with --save'
57+
required: false
5558
sbom:
5659
description: 'SBOM is a shorthand for --set=*.attest=type=sbom'
5760
required: false

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119788,6 +119788,7 @@ function getInputs() {
119788119788
provenance: getProvenanceInput(),
119789119789
push: core.getBooleanInput("push"),
119790119790
save: core.getBooleanInput("save"),
119791+
saveTag: core.getInput("save-tag"),
119791119792
sbom: core.getInput("sbom"),
119792119793
sbomDir: core.getInput("sbom-dir"),
119793119794
set: import_util.Util.getInputList("set", { ignoreComma: true, quote: false }),
@@ -121532,7 +121533,8 @@ async function bake(inputs) {
121532121533
...flag("--build-platform", inputs.buildPlatform),
121533121534
...flag("--lint", inputs.lint),
121534121535
...flag("--lint-fail-on", inputs.lintFailOn),
121535-
...flag("--save", inputs.save)
121536+
...flag("--save", inputs.save),
121537+
...flag("--save-tag", inputs.saveTag)
121536121538
];
121537121539
const args = [...bakeArgs, ...depotArgs, ...targets];
121538121540
let token = inputs.token ?? process.env.DEPOT_TOKEN;

src/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface Inputs {
1818
provenance: string
1919
push: boolean
2020
save: boolean
21+
saveTag?: string
2122
sbom: string
2223
sbomDir: string
2324
set: string[]
@@ -41,6 +42,7 @@ export function getInputs(): Inputs {
4142
provenance: getProvenanceInput(),
4243
push: core.getBooleanInput('push'),
4344
save: core.getBooleanInput('save'),
45+
saveTag: core.getInput('save-tag'),
4446
sbom: core.getInput('sbom'),
4547
sbomDir: core.getInput('sbom-dir'),
4648
set: Util.getInputList('set', {ignoreComma: true, quote: false}),

src/depot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export async function bake(inputs: Inputs) {
109109
...flag('--lint', inputs.lint),
110110
...flag('--lint-fail-on', inputs.lintFailOn),
111111
...flag('--save', inputs.save),
112+
...flag('--save-tag', inputs.saveTag)
112113
]
113114
const args = [...bakeArgs, ...depotArgs, ...targets]
114115

0 commit comments

Comments
 (0)