-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from depot/sbom-examples
Add sbom example with upload artifact
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
```yaml | ||
name: Buid image with SBOM | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docker-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Depot CLI | ||
uses: depot/setup-action@v1 | ||
|
||
- name: Build image with Software Bill of Materials (SBOM) | ||
uses: depot/build-push-action@v1 | ||
with: | ||
# if no depot.json file is at the root of your repo, you must specify the project id | ||
project: <your-depot-project-id> | ||
sbom: true | ||
sbom-dir: ./sbom-output | ||
|
||
- name: upload SBOM directory as a build artifact | ||
uses: actions/upload-artifact@v3.1.0 | ||
with: | ||
path: ./sbom-output | ||
name: "SBOM" | ||
``` |