diff --git a/.forgejo/workflows/dev-release.yml b/.forgejo/workflows/dev-release.yml index 5c7b221..291d765 100644 --- a/.forgejo/workflows/dev-release.yml +++ b/.forgejo/workflows/dev-release.yml @@ -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}" diff --git a/ci/build.sh b/ci/build.sh index 668b199..63262e8 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -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