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 e000936 commit 777fb4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Upload File
uses: actions/upload-artifact@v4
with:
name: sbom
name: Inspector Scan SBOM Results
path: |
sboms/*.json
inspector_scan_results/*.json
logs/*.txt
17 changes: 6 additions & 11 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,20 @@ fi


# create a directory to store output SBOMs
mkdir sboms
sbom_dir="inspector_scan_results"
mkdir $sbom_dir

# give the output SBOM a traceable name
prefix="sboms/inspector-scan-sbom"
# give the output SBOM a traceable name:
#
dtg=$(date +"%Y-%m-%d_%H-%M-%S")
job=$(echo $GITHUB_RUN_ID)
out_file="$prefix-$job-$dtg.json"
out_file="$sbom_dir/$job-$dtg.json"
echo "Out file $out_file"

$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
chmod -R o+r sboms

# Debug - delete these later
echo "GitHub Job: $GITHUB_JOB"
echo "GitHub Sha-short: $GITHUB_SHA_SHORT"
echo "GitHub Sha: $GITHUB_SHA"
echo "GitHub Run ID: $GITHUB_RUN_ID"
chmod -R o+r $sbom_dir

0 comments on commit 777fb4b

Please sign in to comment.