Skip to content

Commit d765127

Browse files
Merge pull request #23 from depot/save
2 parents 6246e3c + 900f07e commit d765127

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

Diff for: README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ This action needs a Depot API token to communicate with your project's builders.
103103
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104104
| `project` | String | Depot [project](https://depot.dev/docs/core-concepts#projects) ID to route the image build to your projects builders (default: the `depot.json` file at the root of your repo) |
105105
| `token` | String | You must authenticate with the Depot API to communicate with your projects builders ([see Authentication above](#authentication)) |
106-
| `build-platform` | String | The platform to use for the build ( `linux/amd64` or `linux/arm64`) |
106+
| `build-platform` | String | The platform to use for the build ( `linux/amd64` or `linux/arm64`) |
107107
| `buildx-fallback` | Boolean | If true, this action will fallback to using `docker buildx build` if `depot build` is unable to acquire a builder connection. This requires installing buildx with [`docker/setup-buildx-action`](https://github.com/docker/setup-buildx-action) (default: `false`) |
108-
| `lint` | Boolean | Lint dockerfiles and fail build if any issues are of `error` severity. (default `false`) |
109-
| `lint-fail-on` | String | Severity of linter issue to cause the build to fail. (`error`, `warn`, `info`, `none`) |
108+
| `lint` | Boolean | Lint dockerfiles and fail build if any issues are of `error` severity. (default `false`) |
109+
| `lint-fail-on` | String | Severity of linter issue to cause the build to fail. (`error`, `warn`, `info`, `none`) |
110+
| `save` | Boolean | Save the image to the Depot ephemeral registry (for use with the [depot/pull-action](https://github.com/depot/pull-action)) |
110111

111112
### General inputs
112113

Diff for: action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ inputs:
9494
description: 'Push is a shorthand for --output=type=registry'
9595
required: false
9696
default: 'false'
97+
save:
98+
description: 'Save the image to the Depot ephemeral registry'
99+
required: false
100+
default: 'false'
97101
sbom:
98102
description: 'Generate SBOM attestation for the build (shorthand for --attest=type=sbom)'
99103
required: false

Diff for: dist/index.js

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/context.ts

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface Inputs {
3333
provenance: string
3434
pull: boolean
3535
push: boolean
36+
save: boolean
3637
sbom: string
3738
sbomDir: string
3839
secretFiles: string[]
@@ -74,6 +75,7 @@ export function getInputs(): Inputs {
7475
provenance: getProvenanceInput(),
7576
pull: core.getBooleanInput('pull'),
7677
push: core.getBooleanInput('push'),
78+
save: core.getBooleanInput('save'),
7779
sbom: core.getInput('sbom'),
7880
sbomDir: core.getInput('sbom-dir'),
7981
secretFiles: core.getMultilineInput('secret-files'),

Diff for: src/depot.ts

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export async function build(inputs: Inputs) {
123123
...flag('--build-platform', inputs.buildPlatform),
124124
...flag('--lint', inputs.lint),
125125
...flag('--lint-fail-on', inputs.lintFailOn),
126+
...flag('--save', inputs.save),
126127
]
127128
const args = [...buildxArgs, ...depotArgs]
128129

0 commit comments

Comments
 (0)