Merge branch 'main' of https://github.com/0GiS0/dependency-management… #5
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
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 and send to Dependecy-track server | |
run: | | |
FETCH_LICENSE=true cdxgen tour-of-heroes-dotnet-api/ -o bom-1.4.json --spec-version 1.4 \ | |
--server-url ${{ secrets.DEPENDENCYTRACK_HOSTNAME }} \ | |
--api-key ${{ secrets.DEPENDENCYTRACK_APIKEY }} \ | |
--project-name tour-of-heroes-dotnet-cdxgen \ | |
--project-version 1.0.0 \ | |
--auto-create |