File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99env :
1010 BUILD_SUFFIX : -build-${{ github.run_id }}_${{ github.run_attempt }}
1111 DOCKER_METADATA_SET_OUTPUT_ENV : ' true'
12+ ARCHIVESSPACE_RESOURCE_TOOLBAR_SHA256 : 2feb4bf50a103574dc541d36dd237b5d49f6e663439dfe23314b89ccf964b83d
1213
1314jobs :
15+ verify-upstream :
16+ runs-on : ubuntu-24.04
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Verify upstream resource toolbar checksum
22+ run : |
23+ set -euo pipefail
24+ version="$(sed -n 's/^ARG ARCHIVESSPACE_VERSION="\([^"]*\)"/\1/p' Dockerfile)"
25+ repo_dir="$(mktemp -d)"
26+ trap 'rm -rf "$repo_dir"' EXIT
27+
28+ if [[ -z "$version" ]]; then
29+ echo "Could not determine ARCHIVESSPACE_VERSION from .env.example"
30+ exit 1
31+ fi
32+
33+ git init -q "$repo_dir"
34+ git -C "$repo_dir" remote add origin https://github.com/archivesspace/archivesspace.git
35+ git -C "$repo_dir" fetch --depth 1 origin "refs/tags/${version}:refs/tags/${version}"
36+
37+ actual="$(git -C "$repo_dir" show "${version}:frontend/app/views/resources/_toolbar.html.erb" | shasum -a 256 | awk '{print $1}')"
38+
39+ if [[ "$actual" != "$ARCHIVESSPACE_RESOURCE_TOOLBAR_SHA256" ]]; then
40+ echo "Expected checksum: $ARCHIVESSPACE_RESOURCE_TOOLBAR_SHA256"
41+ echo "Actual checksum: $actual"
42+ echo "Upstream file changed for ArchivesSpace ${version}"
43+ exit 1
44+ fi
45+
1446 build :
47+ needs : verify-upstream
1548 runs-on : ${{ matrix.runner }}
1649 outputs :
1750 image-arm64 : ${{ steps.gen-output.outputs.image-arm64 }}
You can’t perform that action at this time.
0 commit comments