Merge pull request #254 from CivicActions/MAHOME-1144-add-impact-nav-… #25
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: Scan packages and upload SBOM | |
'on': | |
push: | |
branches: | |
- main | |
jobs: | |
upload_sbom: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Generate SBOM using Syft | |
uses: anchore/[email protected] | |
with: | |
format: cyclonedx-json | |
artifact-name: sbom.json | |
- uses: actions/download-artifact@v3 | |
with: | |
name: sbom.json | |
- name: Upload SBOM to DependencyTrack | |
run: | | |
curl -sS -X "POST" "https://dependencytrack.cicd.civicactions.net/api/v1/bom" \ | |
-H "Content-Type: multipart/form-data" \ | |
-H "X-Api-Key: ${{ secrets.DEPENDENCYTRACK_APIKEY }}" \ | |
-F "projectName=CivicActions Homesite" \ | |
-F "projectVersion=main" \ | |
-F "[email protected]" > /dev/null | |
shell: bash |