chore(deps): bump github.com/mholt/archives from 0.1.1 to 0.1.2 #2434
Workflow file for this run
This file contains hidden or 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
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.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 |