Skip to content

Commit fe21fca

Browse files
authored
Merge pull request #21 from depot/feat/sbom-dir
feat: add output directory for image SBOMs
2 parents 39acb3f + ca34cd8 commit fe21fca

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ The following inputs can be used as `step.with` keys and match the inputs from [
135135
| `pull` | Bool | Always attempt to pull all referenced images (default `false`) |
136136
| `push` | Bool | [Push](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#push) is a shorthand for `--output=type=registry` (default `false`) |
137137
| `sbom` | Bool/String | Generate [SBOM](https://docs.docker.com/build/attestations/sbom/) attestation for the build (shorthand for `--attest=type=sbom`) |
138+
| `sbom-dir` | String | Save all image [SBOM](https://docs.docker.com/build/attestations/sbom/) to this output directory |
138139
| `secrets` | List | List of [secrets](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=string`, `GIT_AUTH_TOKEN=mytoken`) |
139140
| `secret-files` | List | List of [secret files](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=filename`, `MY_SECRET=./secret.txt`) |
140141
| `shm-size` | String | Size of [`/dev/shm`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-size-of-devshm---shm-size) (e.g., `2g`) |

action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ inputs:
9797
sbom:
9898
description: 'Generate SBOM attestation for the build (shorthand for --attest=type=sbom)'
9999
required: false
100+
sbom-dir:
101+
description: 'Directory to output SBOMs for each built image'
102+
required: false
100103
secrets:
101104
description: 'List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)'
102105
required: false

dist/index.js

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

src/context.ts

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface Inputs {
3434
pull: boolean
3535
push: boolean
3636
sbom: string
37+
sbomDir: string
3738
secretFiles: string[]
3839
secrets: string[]
3940
shmSize: string
@@ -74,6 +75,7 @@ export function getInputs(): Inputs {
7475
pull: core.getBooleanInput('pull'),
7576
push: core.getBooleanInput('push'),
7677
sbom: core.getInput('sbom'),
78+
sbomDir: core.getInput('sbom-dir'),
7779
secretFiles: core.getMultilineInput('secret-files'),
7880
secrets: core.getMultilineInput('secrets'),
7981
shmSize: core.getInput('shm-size'),

src/depot.ts

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export async function build(inputs: Inputs) {
7878
...flag('--pull', inputs.pull),
7979
...flag('--push', inputs.push),
8080
...flag('--sbom', inputs.sbom),
81+
...flag('--sbom-dir', inputs.sbomDir),
8182
...flag('--shm-size', inputs.shmSize),
8283
...flag('--ssh', inputs.ssh),
8384
...flag('--tag', inputs.tags),

0 commit comments

Comments
 (0)