Skip to content

Commit

Permalink
Merge pull request #23 from depot/save
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Oct 26, 2023
2 parents 6246e3c + 900f07e commit d765127
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ This action needs a Depot API token to communicate with your project's builders.
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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) |
| `token` | String | You must authenticate with the Depot API to communicate with your projects builders ([see Authentication above](#authentication)) |
| `build-platform` | String | The platform to use for the build ( `linux/amd64` or `linux/arm64`) |
| `build-platform` | String | The platform to use for the build ( `linux/amd64` or `linux/arm64`) |
| `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`) |
| `lint` | Boolean | Lint dockerfiles and fail build if any issues are of `error` severity. (default `false`) |
| `lint-fail-on` | String | Severity of linter issue to cause the build to fail. (`error`, `warn`, `info`, `none`) |
| `lint` | Boolean | Lint dockerfiles and fail build if any issues are of `error` severity. (default `false`) |
| `lint-fail-on` | String | Severity of linter issue to cause the build to fail. (`error`, `warn`, `info`, `none`) |
| `save` | Boolean | Save the image to the Depot ephemeral registry (for use with the [depot/pull-action](https://github.com/depot/pull-action)) |

### General inputs

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ inputs:
description: 'Push is a shorthand for --output=type=registry'
required: false
default: 'false'
save:
description: 'Save the image to the Depot ephemeral registry'
required: false
default: 'false'
sbom:
description: 'Generate SBOM attestation for the build (shorthand for --attest=type=sbom)'
required: false
Expand Down
18 changes: 9 additions & 9 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface Inputs {
provenance: string
pull: boolean
push: boolean
save: boolean
sbom: string
sbomDir: string
secretFiles: string[]
Expand Down Expand Up @@ -74,6 +75,7 @@ export function getInputs(): Inputs {
provenance: getProvenanceInput(),
pull: core.getBooleanInput('pull'),
push: core.getBooleanInput('push'),
save: core.getBooleanInput('save'),
sbom: core.getInput('sbom'),
sbomDir: core.getInput('sbom-dir'),
secretFiles: core.getMultilineInput('secret-files'),
Expand Down
1 change: 1 addition & 0 deletions src/depot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export async function build(inputs: Inputs) {
...flag('--build-platform', inputs.buildPlatform),
...flag('--lint', inputs.lint),
...flag('--lint-fail-on', inputs.lintFailOn),
...flag('--save', inputs.save),
]
const args = [...buildxArgs, ...depotArgs]

Expand Down

0 comments on commit d765127

Please sign in to comment.