From d39837901810c525430248f13cd107597945c51d Mon Sep 17 00:00:00 2001 From: Michael Long Date: Mon, 19 Feb 2024 12:05:42 -0500 Subject: [PATCH] modify file upload --- entrypoint.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 070263e..59c5513 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -28,13 +28,17 @@ fi pwd=$(eval pwd) echo "current working directory: " $pwd ls -lsah -$sbomgen $artifact_type $artifact_path_arg $artifact_path $prog --scan-sbom -o sbom.json -# give other users read perms so we can upload the sbom file as an Actions artifact +# create a directory with perms needed to upload output SBOM as GitHub job artifact mkdir sboms -mv sbom.json sboms chmod -R o+r sboms +# give the output SBOM a helpful name +timestamp=$(date +"%Y-%m-%d_%H-%M-%S") +out_file="sboms/inspector-scan-sbom_$timestamp.json" + +$sbomgen $artifact_type $artifact_path_arg $artifact_path $prog --scan-sbom -o $out_file + # move the logs and give needed permissions for the uploader mv /github/home/.inspector-sbomgen/logs ./ chmod -R o+r logs