File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -706,13 +706,10 @@ jobs:
706706 path : jetsocat/nuget/*.nupkg
707707 if-no-files-found : error
708708
709- # FIXME: Looks like the wrong place to _upload_ that. There is no guarantee we actually deploy the package at this point.
710709 generate-sbom :
711- name : Upload SBOM
710+ name : Generate SBOM
712711 runs-on : ubuntu-latest
713712 needs : preflight
714- if : ${{ github.ref == 'refs/heads/master' }}
715- environment : sbom
716713
717714 steps :
718715 - name : Checkout ${{ github.repository }}
@@ -736,28 +733,8 @@ jobs:
736733 - name : Generate SBOM
737734 uses : ./.github/workflows/cdxgen
738735
739- - name : Save SBOM
736+ - name : Save SBOM artifact
740737 uses : actions/upload-artifact@v4
741738 with :
742- name : bom.json
739+ name : sbom
743740 path : bom.json
744-
745- - name : Upload SBOM to OneDrive Releases
746- uses : ./.github/workflows/onedrive-upload
747- with :
748- azure_client_id : ${{ secrets.ONEDRIVE_AUTOMATION_CLIENT_ID }}
749- azure_client_secret : ${{ secrets.ONEDRIVE_AUTOMATION_CLIENT_SECRET }}
750- conflict_behavior : replace
751- destination_path : /Gateway/${{ needs.preflight.outputs.version }}
752- remote : releases
753- source_path : bom.json
754-
755- - name : Upload SBOM to Dependency-Track
756- uses : ./.github/workflows/dtrack-upload-sbom
757- with :
758- api_key : ${{ secrets.DTRACK_AUTOMATION_API_KEY }}
759- autocreate : ' true'
760- bom_filename : bom.xml
761- project_name : devolutions-gateway
762- project_version : ${{ needs.preflight.outputs.version }}
763- server_hostname : ' dtrack-api.devolutions.com'
Original file line number Diff line number Diff line change @@ -464,3 +464,35 @@ jobs:
464464 GITHUB_TOKEN : ${{ github.token }}
465465 run : ./ci/remove-labels.ps1 -Label 'release-required'
466466
467+ upload-sbom :
468+ name : Upload SBOM
469+ runs-on : ubuntu-latest
470+ needs : preflight
471+ if : needs.preflight.outputs.skip-publishing == 'false' && inputs.dry-run == false
472+ environment : sbom
473+
474+ steps :
475+ - name : Download SBOM artifact
476+ env :
477+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
478+ run : gh run download ${{ steps.get-run.outputs.run }} -n sbom --repo $Env:GITHUB_REPOSITORY
479+
480+ - name : Upload SBOM to OneDrive Releases
481+ uses : ./.github/workflows/onedrive-upload
482+ with :
483+ azure_client_id : ${{ secrets.ONEDRIVE_AUTOMATION_CLIENT_ID }}
484+ azure_client_secret : ${{ secrets.ONEDRIVE_AUTOMATION_CLIENT_SECRET }}
485+ conflict_behavior : replace
486+ destination_path : /Gateway/${{ needs.preflight.outputs.version }}
487+ remote : releases
488+ source_path : bom.json
489+
490+ - name : Upload SBOM to Dependency-Track
491+ uses : ./.github/workflows/dtrack-upload-sbom
492+ with :
493+ api_key : ${{ secrets.DTRACK_AUTOMATION_API_KEY }}
494+ autocreate : ' true'
495+ bom_filename : bom.xml
496+ project_name : devolutions-gateway
497+ project_version : ${{ needs.preflight.outputs.version }}
498+ server_hostname : ' dtrack-api.devolutions.com'
You can’t perform that action at this time.
0 commit comments