-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* goreleaser: support multi-arch container image see https://goreleaser.com/customization/docker_manifest/\#docker-manifests * ci: store dist folder * provenance for docker images * add latest * fix multi-line images * use script * use script
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
if [ ! -e dist/artifacts.json ] ; then | ||
exit 1 | ||
fi | ||
|
||
echo "Gather the container images generated and published with goreleaser" | ||
images=$(jq -r '[.[] | select (.type=="Published Docker Image") | select(.name|endswith("latest")|not)]' dist/artifacts.json) | ||
image_1=$(echo "$images" | jq -r '.[0].name') | ||
image_2=$(echo "$images" | jq -r '.[1].name') | ||
digest_1=$(echo "$images" | jq -r '.[0].extra.Digest') | ||
digest_2=$(echo "$images" | jq -r '.[1].extra.Digest') | ||
|
||
echo "Export github actions outputs" | ||
echo "name_1=$image_1" >> "$GITHUB_OUTPUT" | ||
echo "name_2=$image_2" >> "$GITHUB_OUTPUT" | ||
echo "digest_1=$digest_1" >> "$GITHUB_OUTPUT" | ||
echo "digest_2=$digest_2" >> "$GITHUB_OUTPUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters