Skip to content

chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the actions-organization group #6959

chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the actions-organization group

chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the actions-organization group #6959

name: Test Package Create Checksums
on:
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: package-create-${{ github.ref }}
cancel-in-progress: true
jobs:
test-checksums:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Build Zarf
run: make build
- name: Build examples
run: make build-examples ARCH=amd64
- name: Compare checksums
run: |
set -e
# Any component tar files in a package will have the same permissions as the files included in them
# Therefore to before building a package to replace a file in hack/examples-checksums/ checksums you must run `chmod -R g-w in zarf/examples`
for f in hack/examples-checksums/*.txt
do
NAME=$(basename $f .txt)
CHECKSUM=$(tar Oxf build/$NAME.tar.zst checksums.txt | grep -v sboms.tar)
EXPECTED_CHECKSUM=$(cat $f | grep -v sboms.tar)
if [[ "$CHECKSUM" != "$EXPECTED_CHECKSUM" ]]
then
echo "Package $f does not have expected checksum."
echo "$CHECKSUM"
echo "-----"
echo "$EXPECTED_CHECKSUM"
exit 1
fi
done