Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DI-1349] Fix execution in on-prerelease.yml #73

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/on-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
shell: pwsh
run: |
$packageName = "${{ env.PACKAGE_NAME }}"
$version = "${{ needs.pack.outputs.data-import-version }}"

$url = "https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-linux-x64"
$out = "$($env:RUNNER_TEMP)/sbom-tool"
Expand All @@ -120,24 +121,24 @@ jobs:
Get-ChildItem -Include "$packageName.*.nupkg" -Recurse | ForEach-Object { $_.FullName } > buildfilelist.txt
New-Item -Path manifest -Type Directory

$version = "${{ needs.pack.outputs.data-import-version }}"
dotnet tool install --global Microsoft.Sbom.DotNetTool

&$out generate `
sbom-tool generate `
-b ./ `
-bl ./buildfilelist.txt `
-bc "./$packageName" `
-pn "$packageName" `
-pv $version `
-nsb https://ed-fi.org `
-m manifest `
-m ./ `
-ps "Ed-Fi Alliance"

- name: Upload SBOM
if: success()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: ${{ env.PACKAGE_NAME }}-SBOM
path: ./manifest
path: ${{ env.MANIFEST_FILE }}
if-no-files-found: error
retention-days: 30

Expand All @@ -146,7 +147,7 @@ jobs:
shell: bash
run: |
# sha256sum returns "<hashcode> <name of file". Split that and return only the <hashcode>.
sbom_hash=$(sha256sum ./manifest/${{ env.MANIFEST_FILE }} | awk '{split($0,a); print a[1]}')
sbom_hash=$(sha256sum ./${{ env.MANIFEST_FILE }} | awk '{split($0,a); print a[1]}')
echo "sbom-hash-code=$sbom_hash" >> $GITHUB_OUTPUT

sbom-attach:
Expand Down
1 change: 0 additions & 1 deletion DataImport.Web/Helpers/JsonValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ public bool IsValidJson(string data)
}
}
}