Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Add sbom github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Sep 8, 2022
1 parent 79738ba commit 6d79a9d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ jobs:
uses: ./.github/workflows/reusable-build.yaml
secrets:
PUZZLE_REGISTRY_USERNAME: ${{ secrets.PUZZLE_REGISTRY_USERNAME }}
PUZZLE_REGISTRY_TOKEN: ${{ secrets.PUZZLE_REGISTRY_TOKEN }}
PUZZLE_REGISTRY_TOKEN: ${{ secrets.PUZZLE_REGISTRY_TOKEN }}
bom:
needs: build
uses: ./.github/workflows/reusable-boms.yaml
secrets:
PUZZLE_DEP_TRACK_URL: ${{ secrets.PUZZLE_DEP_TRACK_URL}}
PUZZLE_DEP_TRACK_TOKEN: ${{ secrets.PUZZLE_DEP_TRACK_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/manual-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
uses: ./.github/workflows/reusable-build.yaml
secrets:
username: ${{ secrets.PUZZLE_REGISTRY_USERNAME }}
password: ${{ secrets.PUZZLE_REGISTRY_TOKEN }}
password: ${{ secrets.PUZZLE_REGISTRY_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/reusable-boms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

name: 'Reusable: Build BOM for dependency tracker'

on:
workflow_call:
secrets:
PUZZLE_DEP_TRACK_URL:
description: 'Needed for the dep track push'
required: false
PUZZLE_DEP_TRACK_TOKEN:
description: 'Needed for the dep track push'
required: false

jobs:
build:
environment: deploy
runs-on: 'ubuntu-latest'
steps:
- name: generate-bom
run: |-
npm install -g @appthreat/cdxgen && \
mkdir ./reports && \
cdxgen -o ./reports/bom.xml -r ./ && \
cdxgen --server-url ${{ secrets.PUZZLE_DEP_TRACK_URL }} \
--api-key ${{ secrets.PUZZLE_DEP_TRACK_TOKEN }} \
--project-name $GITHUB_REPOSITORY \
--project-version $GITHUB_REF \
--recurse ./

0 comments on commit 6d79a9d

Please sign in to comment.