Skip to content

Commit 3ebc0d4

Browse files
authored
Merge pull request #40 from depot/feat/save-tags
feat: add `save-tags` for multiple depot registry tags
2 parents 2583627 + d662c5a commit 3ebc0d4

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ This action needs a Depot API token to communicate with your project's builders.
112112
| `lint` | Boolean | Lint dockerfiles and fail build if any issues are of `error` severity. (default `false`) |
113113
| `lint-fail-on` | String | Severity of linter issue to cause the build to fail. (`error`, `warn`, `info`, `none`) |
114114
| `save` | Boolean | Save the image to the Depot Registry (for use with the [depot/pull-action](https://github.com/depot/pull-action)) |
115-
| `save-tag` | Boolean | Tag your image in the Depot Registry |
115+
| `save-tag` | String | Tag your image in the Depot Registry |
116+
| `save-tags` | List | Tags for your image in the Depot Registry |
116117

117118
### General inputs
118119

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ inputs:
101101
save-tag:
102102
description: 'Tag your image in the Depot Registry'
103103
required: false
104+
save-tags:
105+
description: 'Tags for your image in the Depot Registry'
106+
required: false
104107
sbom:
105108
description: 'Generate SBOM attestation for the build (shorthand for --attest=type=sbom)'
106109
required: false

dist/index.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface Inputs {
3535
push: boolean
3636
save: boolean
3737
saveTag: string
38+
saveTags: string[]
3839
sbom: string
3940
sbomDir: string
4041
secretFiles: string[]
@@ -78,6 +79,7 @@ export function getInputs(): Inputs {
7879
push: core.getBooleanInput('push'),
7980
save: core.getBooleanInput('save'),
8081
saveTag: core.getInput('save-tag'),
82+
saveTags: getListInput('save-tags'),
8183
sbom: core.getInput('sbom'),
8284
sbomDir: core.getInput('sbom-dir'),
8385
secretFiles: getListInput('secret-files', {ignoreComma: true}),

src/depot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ export async function build(inputs: Inputs) {
124124
...flag('--lint', inputs.lint),
125125
...flag('--lint-fail-on', inputs.lintFailOn),
126126
...flag('--save', inputs.save),
127-
...flag('--save-tag', inputs.saveTag)
127+
...flag('--save-tag', inputs.saveTag),
128+
...flag('--save-tag', inputs.saveTags),
128129
]
129130

130131
const args = [...buildxArgs, ...depotArgs]

0 commit comments

Comments
 (0)