fix: validate GitHub App mounts before deployment and distinguish removed repositories

This commit is contained in:
Thomas Durieux committed 2026-11-14 22:57:01 +00:00
1 parent 3fbf2cbad7
commit 65914c743e
9 files changed
+118 -14

No files matched your search

+7
View File
@@ -55,6 +55,13 @@ before="$(image_id "$IMAGE")"
docker compose build anonymous_github
after="$(image_id "$IMAGE")"
# Validate replacement configuration before stopping any working container.
# A healthy HTTP endpoint does not prove that the GitHub App key is mounted.
for service in anonymous_github streamer; do
log "Checking GitHub App configuration in ${service}"
docker compose run --rm --no-deps --entrypoint node "$service" ./build/scripts/check-github-app-key.js
done
if [[ $legacy_alerts == 1 ]]; then
protocol="$(docker image inspect -f '{{index .Config.Labels "science.4open.owner-alert-protocol"}}' "$IMAGE")"
[[ $protocol == recipient-v2 ]] || { warn "replacement image lacks recipient alert migration support"; exit 1; }