Skip to content

fix cdxgen installation #2

fix cdxgen installation

fix cdxgen installation #2

name: Dependecy-track
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: 0gis0/tour-of-heroes-dotnet-api
- name: Configure .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Install cdxgen
run: npm install -g @cyclonedx/cdxgen
- name: Generate SBOM
run: cdxgen tour-of-heroes-dotnet-api/ -o bom-1.4.json --spec-version 1.4
- name: Send SBOM to DependencyTrack server
uses: DependencyTrack/[email protected]
with:
serverHostname: ${{ secrets.DEPENDENCYTRACK_HOSTNAME }}
apiKey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
projectName: 'Tour of Heroes API from GitHub Actions'
projectVersion: 'main'
bomFilename: "bom-1.4.json"
autoCreate: true