Skip to content

Commit

Permalink
Fix sbom upload
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshnoronha committed Oct 3, 2024
1 parent ed310e9 commit 2474547
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
SUPPLIER_URL: https://interlynk.io
PYLYNK_TEMP_DIR: $RUNNER_TEMP/pylynk
SBOM_TEMP_DIR: $RUNNER_TEMP/sbom
SBOM_FILE_PATH: $RUNNER_TEMP/sbom/_manifest/spdx_2.2/manifest.spdx.json
MS_SBOM_TOOL_URL: https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-linux-x64
MS_SBOM_TOOL_EXCLUDE_DIRS: "**/samples/**"

Expand Down Expand Up @@ -46,6 +45,11 @@ jobs:
- run: go version
- run: goreleaser -v

- name: Download sbom-tool
run: |
curl -Lo $RUNNER_TEMP/sbom-tool ${{ env.MS_SBOM_TOOL_URL }}
chmod +x $RUNNER_TEMP/sbom-tool
- name: Releaser
run: make release
env:
Expand All @@ -56,16 +60,12 @@ jobs:
run: |
cd ${{ github.workspace }}
mkdir -p ${{ env.SBOM_TEMP_DIR}}
curl -Lo $RUNNER_TEMP/sbom-tool ${{ env.MS_SBOM_TOOL_URL }}
chmod +x $RUNNER_TEMP/sbom-tool
$RUNNER_TEMP/sbom-tool generate -b ${{ env.SBOM_TEMP_DIR }} -bc . -pn ${{ env.TOOL_NAME }} -pv ${{ env.LATEST_TAG }} -ps ${{ env.SUPPLIER_NAME}} -nsb ${{ env.SUPPLIER_URL }} -cd "--DirectoryExclusionList ${{ env.MS_SBOM_TOOL_EXCLUDE_DIRS }}"
ls -lR ${{ env.SBOM_TEMP_DIR }}
- name: Upload SBOM as Release Asset
uses: actions/upload-release-asset@v1
uses: actions/upload-artifact@v4
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.SBOM_FILE_PATH }}
asset_name: sbomasm-${{ env.LATEST_TAG }}.sbom.spdx.json
asset_content_type: application/json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: sbom
path: /home/runner/work/_temp/sbom/_manifest/spdx_2.2/manifest.spdx.json
if-no-files-found: error

0 comments on commit 2474547

Please sign in to comment.