Skip to content

Commit

Permalink
Merge pull request #150 from rjaegers/main
Browse files Browse the repository at this point in the history
fix: GITHUB_OUTPUT doesn't need {}
  • Loading branch information
JeroenKnoops authored Oct 25, 2022
2 parents d44319c + b4ce923 commit 75cafd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions container_digest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ docker pull "$registry_url_prefix"/"$imagename":"$basetag"
echo "Getting digest for $registry_url_prefix/$imagename:$basetag"
containerdigest=$(docker inspect "$registry_url_prefix"/"$imagename":"$basetag" --format '{{ index .RepoDigests 0 }}' | cut -d '@' -f 2)
echo "found: ${containerdigest}"
echo "{container-digest}={${containerdigest}}" >> "$GITHUB_OUTPUT"
echo "container-digest=${containerdigest}" >> "$GITHUB_OUTPUT"

echo "--------------------------------------------------------------------------------------------"

echo "Getting tags"
containertags=$(docker inspect "$registry_url_prefix"/"$imagename":"$basetag" --format '{{ join .RepoTags "\n" }}' | sed 's/.*://' | paste -s -d ',' -)
echo "found: ${containertags}"
echo "{container-tags}={${containertags}}" >> "$GITHUB_OUTPUT"
echo "container-tags=${containertags}" >> "$GITHUB_OUTPUT"

echo "============================================================================================"
echo "Finished getting docker digest and tags"
Expand Down Expand Up @@ -107,7 +107,7 @@ then
echo "-------------------------------------------------------------------------------------------"
echo " provenance.json "
echo "-------------------------------------------------------------------------------------------"
echo "{slsa-provenance-file}={provenance.json}" >> "$GITHUB_OUTPUT"
echo "slsa-provenance-file=provenance.json" >> "$GITHUB_OUTPUT"

echo "============================================================================================"
echo "Finished getting SLSA Provenance"
Expand Down Expand Up @@ -142,7 +142,7 @@ then
echo "Remove formatting"
jq -c . sbom-spdx-formatted.json > sbom-spdx.json

echo "{sbom-file}={sbom-spdx.json}" >> "$GITHUB_OUTPUT"
echo "sbom-file=sbom-spdx.json" >> "$GITHUB_OUTPUT"

echo "============================================================================================"
echo "Finished getting SBOM"
Expand Down
3 changes: 1 addition & 2 deletions docker_build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "$#" -lt 4 ]; then
fi

push() {
echo "{push-indicator}={true}" >> "$GITHUB_OUTPUT"
echo "push-indicator=true" >> "$GITHUB_OUTPUT"

"${FOREST_DIR}"/docker_push.sh "$@"
"${FOREST_DIR}"/container_digest.sh "$@"
Expand Down Expand Up @@ -53,4 +53,3 @@ done

echo "No branches matched to current branch. No need to push the images to docker hub."
exit 0

0 comments on commit 75cafd6

Please sign in to comment.