Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:35:26 +08:00
commit 3202054ccf
27 changed files with 628 additions and 0 deletions

12
scripts/build-commit-link.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash -u
IMAGE=${1}
expression='.payload | @base64d | fromjson | .predicate.buildConfig.tasks[0].invocation.environment.annotations | ."pipelinesascode.tekton.dev/repo-url" + "/-/commit/" + ."pipelinesascode.tekton.dev/sha"'
output=$(cosign download attestation $IMAGE | jq -r "$expression")
if [[ "$output" == *github.com/* ]] ; then
echo "🐙 $output" | sed 's|/-/|/|'
else
echo "🦊 $output"
fi