Skip to content

Commit

Permalink
artifact config changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Ghazaryan committed Jun 9, 2024
1 parent 01261eb commit eaa814e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ jobs:
with:
go-version: '1.22'

- name: Generate CycloneDX SBOM artifacts 📃
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
cyclonedx-gomod mod -json -licenses -output cyclonedx-xk6-mongo-${{ github.ref_name }}.json
- name: Upload CycloneDX SBOM artifact for go.mod 💾
- name: Generate dependencies list
run: go list -m all > go.list

- name: Install SPDX tool
run: go install github.com/spdx/tools-golang/bom/cmd/rdf2v1@latest

- name: Generate SBOM
run: rdf2v1 -format tagvalue go.list > sbom.spdx

- name: Upload SPDX SBOM artifact for go.mod 💾
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v3
with:
name: cyclonedx-xk6-mongo-${{ github.ref_name }}.json
path:
cyclonedx-xk6-mongo-${{ github.ref_name }}.json
name: sbom.spdx
path: sbom.spdx

- name: Create Release 📦
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit eaa814e

Please sign in to comment.