-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from alexander-demicev/slsa
Add SLSA signing and provenance to release
- Loading branch information
Showing
3 changed files
with
198 additions
and
9 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Run your command and capture its output | ||
output=$(make docker-list-all REGISTRY="$1" ORG="$2" TAG="$3") | ||
|
||
# Use a for loop to iterate over each line | ||
IFS=$'\n' # Set the Internal Field Separator to newline | ||
line_count=0 # Counter to keep track of the current line | ||
total_lines=$(echo "$output" | wc -l) # Get the total number of lines | ||
githubimageoutput=("multiarch_image" "amd64_image" "arm64_image" "s390x_image") | ||
githubdigestoutput=("multiarch_digest" "amd64_digest" "arm64_digest" "s390x_digest") | ||
|
||
for line in $output; do | ||
# Run the Docker command and get the digest | ||
digest=$(docker buildx imagetools inspect "$line" --format '{{json .}}' | jq -r .manifest.digest) | ||
|
||
# Add image name and digest to the output | ||
echo "${githubimageoutput[$line_count]}=$line" >> "$GITHUB_OUTPUT" | ||
echo "${githubdigestoutput[$line_count]}=$digest" >> "$GITHUB_OUTPUT" | ||
|
||
# Increment the line counter | ||
line_count=$((line_count + 1)) | ||
done |