Skip to content

Commit

Permalink
Add workflow to generate SBOM (software bill of materials) #561
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Oct 23, 2023
1 parent 41b98c8 commit 9b60c2e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/bom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Software bill of materials (BOM)

on:
push:
branches: [main]

workflow_dispatch:

jobs:
bom:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
cache: "npm"

- name: Install @cyclonedx/cyclonedx-npm
run: npm install @cyclonedx/cyclonedx-npm --no-save

- name: Generate BOM
run: npm exec -- cyclonedx-npm --output-format XML --output-file bom.xml

- name: Push BOM to Dependency Track
env:
PROJECT_NAME: bkd-evento-portal
run: |
curl --verbose -s --location --request POST ${{vars.DEPENDENCY_TRACK_URL}}/api/v1/bom \
--header "X-Api-Key: ${{secrets.DEPENDENCY_TRACK_API_KEY}}" \
--header "Content-Type: multipart/form-data" \
--form "autoCreate=true" \
--form "projectName=$PROJECT_NAME" \
--form "projectVersion=latest" \
--form "[email protected]"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Lint & Test ✨](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/test.yml)
[![Build & Deploy ZIP 📦](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/zip.yml/badge.svg?branch=main)](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/zip.yml)
[![Build & Push Docker Image 🚀](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/docker.yml/badge.svg)](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/docker.yml)
[![Software bill of materials (BOM)](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/bom.yml/badge.svg?branch=main)](https://github.com/bkd-mba-fbi/evento-portal/actions/workflows/bom.yml)

The _Evento Portal_ is used to integrate various applications for school administration in a single web portal with a common look and feel.

Expand Down

0 comments on commit 9b60c2e

Please sign in to comment.