Fix SBOM workflow logic (#8848)
* Fix SBOM workflow logic * Revert SYFT pinning for Windows
This commit is contained in:
@@ -15,7 +15,7 @@ defaults:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
jobs:
|
jobs:
|
||||||
#Checking image version on available runner
|
#Checking image version on available runner
|
||||||
version-check:
|
building-sbom:
|
||||||
runs-on: ${{ github.event.client_payload.agentSpec }}
|
runs-on: ${{ github.event.client_payload.agentSpec }}
|
||||||
steps:
|
steps:
|
||||||
- name: Available image version check for ${{ github.event.client_payload.ReleaseBranchName }}
|
- 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 }}') {
|
if ("$imageMajorVersion.$imageMinorVersion" -ne '${{ github.event.client_payload.imageVersion }}') {
|
||||||
throw "Current runner $imageMajorVersion.$imageMinorVersion image version doesn't match ${{ 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
|
- name: Install SYFT tool on Windows
|
||||||
if: ${{ runner.os == '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
|
- name: Install SYFT tool on Ubuntu or macOS
|
||||||
if: ${{ runner.os != 'Windows' }}
|
if: ${{ runner.os != 'Windows' }}
|
||||||
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user