8000 🔏 Sign the installer catalog files in SHA256SUMS by abahmed · Pull Request #634 · abahmed/kwatch · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,9 @@ jobs:
# Installer checksums: the manifests kwatch.sh fetches from
# raw.githubusercontent.com/abahmed/kwatch/<tag>/, named by that
# path and hashed from the tagged blobs (the bytes raw serves).
for f in deploy/deploy.yaml deploy/deploy-no-secrets.yaml deploy/crd.yaml; do
files=(deploy/config-catalog.tsv deploy/crd.yaml deploy/deploy-no-secrets.yaml
deploy/deploy.yaml deploy/feature-catalog.tsv deploy/provider-catalog.tsv)
for f in "${files[@]}"; do
sum=$(git show "$TAG:$f" | sha256sum | awk '{print $1}')
printf '%s %s\n' "$sum" "$f"
done > "$output/SHA256SUMS"
Expand Down Expand Up @@ -916,11 +918,13 @@ jobs:
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity-regexp='^https://github.com/abahmed/kwatch/.github/workflows/publish.yml@' \
"$dir/SHA256SUMS"
test "$(awk '{print $2}' "$dir/SHA256SUMS" | sort | tr '\n' ' ')" = \
"deploy/crd.yaml deploy/deploy-no-secrets.yaml deploy/deploy.yaml "
files=(deploy/config-catalog.tsv deploy/crd.yaml deploy/deploy-no-secrets.yaml
deploy/deploy.yaml deploy/feature-catalog.tsv deploy/provider-catalog.tsv)
expected="$(printf '%s\n' "${files[@]}" | sort | tr '\n' ' ')"
test "$(awk '{print $2}' "$dir/SHA256SUMS" | sort | tr '\n' ' ')" = "$expected"
base="https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$TAG"
mkdir -p "$dir/deploy"
for f in deploy/deploy.yaml deploy/deploy-no-secrets.yaml deploy/crd.yaml; do
for f in "${files[@]}"; do
curl -fsSL --retry 5 "$base/$f" -o "$dir/$f"
done
(cd "$dir" && sha256sum -c SHA256SUMS)
Expand Down
Loading
0