File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 run : pip install -e .[dev]
2626
2727 - name : Fetch latest platform contract
28+ # The platform repo is private, so the contract cannot be downloaded
29+ # from raw.githubusercontent.com (that always returned 404 and the job
30+ # failed before it could report drift). The platform's dispatch now
31+ # carries it: gzip + base64 in client_payload.contractGzB64, with its
32+ # SHA-256. It is read only through env: and parsed as JSON, never
33+ # interpolated into the script. A scheduled run has no payload and
34+ # checks the vendored copy only.
35+ env :
36+ CONTRACT_GZ_B64 : ${{ github.event.client_payload.contractGzB64 }}
37+ CONTRACT_SHA256 : ${{ github.event.client_payload.contractSha256 }}
2838 run : |
29- curl -sSL -o /tmp/latest-contract.json \
30- https://raw.githubusercontent.com/AlphaWaveSystems/awsys-shortener/master/contracts/sdk-contract.json
39+ set -euo pipefail
40+ if [ -z "${CONTRACT_GZ_B64:-}" ]; then
41+ echo "::notice::No contract in the dispatch payload (scheduled run or an older sender); checking the vendored contract only."
42+ cp tests/contracts/sdk-contract.json /tmp/latest-contract.json
43+ else
44+ printf '%s' "$CONTRACT_GZ_B64" | base64 -d | gunzip > /tmp/latest-contract.json
45+ echo "${CONTRACT_SHA256} /tmp/latest-contract.json" | sha256sum -c -
46+ fi
47+ jq -e '.version | type == "string"' /tmp/latest-contract.json > /dev/null
3148
3249 - name : Compare version and diff
3350 id : diff
You can’t perform that action at this time.
0 commit comments