From 50625a842ad09f741de40651332bdc6064c7f0a9 Mon Sep 17 00:00:00 2001 From: Erik Bershel <110455084+erik-bershel@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:18:40 +0100 Subject: [PATCH] Fix SBOM workflow logic (#8848) * Fix SBOM workflow logic * Revert SYFT pinning for Windows --- .github/workflows/create_sbom_report.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/create_sbom_report.yml b/.github/workflows/create_sbom_report.yml index a44c3b1e0..1f4896515 100644 --- a/.github/workflows/create_sbom_report.yml +++ b/.github/workflows/create_sbom_report.yml @@ -15,7 +15,7 @@ defaults: shell: pwsh jobs: #Checking image version on available runner - version-check: + building-sbom: runs-on: ${{ github.event.client_payload.agentSpec }} steps: - name: Available image version check for ${{ github.event.client_payload.ReleaseBranchName }} @@ -26,15 +26,9 @@ jobs: if ("$imageMajorVersion.$imageMinorVersion" -ne '${{ github.event.client_payload.imageVersion }}') { throw "Current runner $imageMajorVersion.$imageMinorVersion image version doesn't match ${{ github.event.client_payload.imageVersion }}." } - #Install and run SYFT, compress SBOM, upload it to release assets - create-sbom: - needs: version-check - runs-on: ${{ github.event.client_payload.agentSpec }} - steps: - #Installation section - name: Install SYFT tool on Windows if: ${{ runner.os == 'Windows' }} - run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft v0.84.1 + run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft - name: Install SYFT tool on Ubuntu or macOS if: ${{ runner.os != 'Windows' }} run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin @@ -68,4 +62,4 @@ jobs: upload_url: "https://uploads.github.com/repos/actions/runner-images/releases/${{ github.event.client_payload.ReleaseID }}/assets{?name,label}" asset_path: ./sbom.json.zip asset_name: sbom.${{ github.event.client_payload.agentSpec }}.json.zip - asset_content_type: application/zip \ No newline at end of file + asset_content_type: application/zip