Skip to content

Commit

Permalink
modify file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Long committed Feb 19, 2024
1 parent 911a75a commit d398379
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d398379

Please sign in to comment.