Skip to content

Commit

Permalink
Merge pull request #19539 from k8s-infra-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-19520-to-release-3.6

[release-3.6] Add verify release assets GitHub workflow
  • Loading branch information
jmhbnz authored Mar 5, 2025
2 parents 7850ff5 + 1fb0f68 commit 30c6d2a
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/verify-released-assets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Verify released binary assets
permissions: read-all

on:
release:
types: [published]

jobs:
verify-assets:
name: Verify released binary assets
runs-on: ubuntu-latest
steps:
- name: Verify binary assets
env:
GH_TOKEN: ${{ github.token }}
RELEASE: ${{ github.event.release.tag_name }}
REPOSITORY: ${{ github.repository }}
run: |
mkdir github-assets
pushd github-assets
gh --repo "${REPOSITORY}" release download "${RELEASE}"
test_assets() {
if [ "$(wc -l <SHA256SUMS)" != "$(find . -name 'etcd-*' | wc -l)" ]; then
echo "::error:: Invalid number of assets"
exit 1
fi
sha256sum -c SHA256SUMS
}
test_assets
popd
mkdir google-assets
for file in github-assets/*; do
file=$(basename "${file}")
echo "Downloading ${file} from Google..."
curl "https://storage.googleapis.com/etcd/${RELEASE}/${file}" \
--fail \
-o "google-assets/${file}"
done
pushd google-assets
test_assets

0 comments on commit 30c6d2a

Please sign in to comment.