-
Notifications
You must be signed in to change notification settings - Fork 5
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 #46 from intelops/cobra-cli
Enhancements to Genval
- Loading branch information
Showing
1,536 changed files
with
3,634 additions
and
271,142 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 |
---|---|---|
|
@@ -9,7 +9,7 @@ linters: | |
enable: | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- unused | ||
|
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,45 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
archs=( | ||
"darwin_amd64" | ||
"darwin_arm64" | ||
"linux_amd64" | ||
"linux_arm64" | ||
"windows_amd64" | ||
"windows_arm64" | ||
) | ||
COMMIT=$(git rev-list --tags --max-count=1) | ||
version=$(git describe --tags ${COMMIT}) | ||
version="${version#v}" | ||
|
||
for arch in "${archs[@]}"; do | ||
# Define the base URL for the release files | ||
base_url="https://github.com/santoshkal/genval-fork/releases/download/v${version}/genval_${version}_${arch}.tar.gz" | ||
|
||
# Download the main release file | ||
curl -L -O "${base_url}" >/dev/null 2>&1 | ||
|
||
# Download the signature file | ||
curl -L -O "${base_url}.sig" >/dev/null 2>&1 | ||
|
||
# Download the certificate file | ||
curl -L -O "${base_url}.crt" >/dev/null 2>&1 | ||
|
||
# Verify the downloaded file using cosign | ||
cosign verify-blob \ | ||
--signature "genval_${version}_${arch}.tar.gz.sig" \ | ||
--certificate "genval_${version}_${arch}.tar.gz.crt" \ | ||
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ | ||
--certificate-identity "https://github.com/intelops/genval/.github/workflows/release.yaml@refs/tags/v${version}" \ | ||
"genval_${version}_${arch}.tar.gz" >/dev/null 2>&1 | ||
|
||
# Check if verification was successful | ||
if [ $? -eq 0 ]; then | ||
echo "Verification successful for genval_${version}_${arch}.tar.gz." | ||
else | ||
echo "Error verifying genval_${version}_${arch}.tar.gz. Exiting." | ||
exit 1 | ||
fi | ||
done |
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 |
---|---|---|
|
@@ -5,4 +5,8 @@ input.yaml | |
input.json | ||
input_dockerfile.json | ||
/output | ||
Dockerfile* | ||
Dockerfile* | ||
genval | ||
cosign | ||
.idea | ||
|
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
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
Oops, something went wrong.