CI: stop wiping shared bread-ecosystem clones mid-job
All checks were successful
dev release / build (push) Successful in 49s

Another product's gen-index step was deleting /tmp/bread-ecosystem-ci-*
between breadhelp's build and test, so the test step 127'd on a missing
ci/build.sh.
This commit is contained in:
Breadway 2026-08-16 13:46:28 +08:00
parent 5ae12e3701
commit d42d6632c6
2 changed files with 6 additions and 6 deletions

View file

@ -71,10 +71,10 @@ jobs:
echo "::error::BAKERY_MINISIGN_SEC_KEY_PATH secret not set — refusing to regenerate dev index.json unsigned (would leave a stale signature mismatched against fresh content and break bakery for everyone on the dev track)"
exit 1
fi
rm -rf /tmp/bread-ecosystem-ci-* 2>/dev/null || true
# mktemp: a fixed clone path races when multiple repos' dev/beta
# workflows run close together on the same self-hosted runner.
ECOSYSTEM_CI_DIR="$(mktemp -d /tmp/bread-ecosystem-ci-XXXXXX)"
# Do not wipe /tmp/bread-ecosystem-ci-* — other products' ci/build.sh
# caches live there and a wipe between their build and test steps
# is a 127 (missing ci/build.sh).
ECOSYSTEM_CI_DIR="$(mktemp -d /tmp/bread-ecosystem-index-XXXXXX)"
git clone --branch main https://git.breadway.dev/Breadway/bread-ecosystem.git "${ECOSYSTEM_CI_DIR}"
TRACK=dev bash "${ECOSYSTEM_CI_DIR}/scripts/gen-index.sh"
rm -rf "${ECOSYSTEM_CI_DIR}"

View file

@ -12,8 +12,8 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
REV="$(cat "${ROOT}/ci/bread-ecosystem.rev")"
CACHE_DIR="/tmp/bread-ecosystem-ci-${REV}"
if [ ! -d "$CACHE_DIR" ]; then
rm -rf /tmp/bread-ecosystem-ci-*
if [ ! -f "$CACHE_DIR/ci/build.sh" ]; then
rm -rf "$CACHE_DIR"
git clone https://git.breadway.dev/Breadway/bread-ecosystem.git "$CACHE_DIR"
git -C "$CACHE_DIR" checkout --quiet "$REV"
fi