ci(deploy-site): wait for the new commit to reach the edge before verifying the public identity
All checks were successful
ci / 정본·보안·린트·타입·테스트 (push) Successful in 54s
ci / 모바일 린트·타입·Jest (push) Successful in 43s
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 23s
ci / .NET API 서버 테스트 (push) Successful in 10s
deploy-site / deploy (push) Successful in 19s
ci / 워크스페이스 빌드 검증 (push) Successful in 35s

This commit is contained in:
Yun Chan 2026-09-26 21:26:19 +09:00
parent 0d92a4a853
commit 79fa5d66f4

View file

@ -69,9 +69,15 @@ jobs:
- name: 공개 배포 식별자 검증
run: |
curl --fail --silent --show-error --retry 6 --retry-delay 5 \
https://d3ro.chanpaca.net/release-identity.json \
--output release-identity.live.json
# Pages 배포가 엣지에 퍼지기까지 수십 초 걸린다. 새 커밋이 보일 때까지 최대 3분 기다린다.
for attempt in $(seq 1 18); do
curl --fail --silent --show-error --retry 3 --retry-delay 5 \
-H 'Cache-Control: no-cache' \
"https://d3ro.chanpaca.net/release-identity.json?t=$(date +%s)" \
--output release-identity.live.json
if node -e "const live=JSON.parse(require('node:fs').readFileSync('release-identity.live.json','utf8')); process.exit(live.commit===process.env.GITHUB_SHA?0:1)"; then break; fi
echo "live commit not yet $GITHUB_SHA (attempt $attempt)"; sleep 10
done
node -e "const fs=require('node:fs'); const live=JSON.parse(fs.readFileSync('release-identity.live.json','utf8')); if(live.commit!==process.env.GITHUB_SHA) throw new Error('public commit mismatch'); const expected=require('./release/product-version.json').version; if(live.version!==expected) throw new Error('public version mismatch')"
node scripts/ci/verify-android-app-links.mjs
curl --fail --silent --show-error https://d3ro.chanpaca.net/ --output /dev/null