Skip to content

Merge branch 'main' of https://github.com/0GiS0/dependency-management… #10

Merge branch 'main' of https://github.com/0GiS0/dependency-management…

Merge branch 'main' of https://github.com/0GiS0/dependency-management… #10

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: |
pwd
FETCH_LICENSE=true cdxgen -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-from-gh-actions \
--project-version 1.0.0 \
--auto-create