ci: use a unique temp dir for the bread-ecosystem clone in dev/beta CI
All checks were successful
dev release / build (push) Successful in 1m24s
All checks were successful
dev release / build (push) Successful in 1m24s
The fixed /tmp/bread-ecosystem-ci path races when multiple repos' dev/beta workflows run close together on the same self-hosted runner — one job's rm -rf/clone can stomp another's in-progress checkout, causing the regenerate-index step to fail intermittently. Switch to mktemp -d.
This commit is contained in:
parent
d480209ec2
commit
21131672ab
2 changed files with 14 additions and 12 deletions
|
|
@ -64,10 +64,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
|
||||
# --branch dev: the TRACK-aware gen-index.sh isn't merged to
|
||||
# bread-ecosystem's main yet, so a default clone would silently
|
||||
# run the old track-blind script against the stable index instead
|
||||
# of writing dl.breadway.dev/dev/index.json at all.
|
||||
git clone --branch dev https://git.breadway.dev/Breadway/bread-ecosystem.git /tmp/bread-ecosystem-ci
|
||||
TRACK=dev bash /tmp/bread-ecosystem-ci/scripts/gen-index.sh
|
||||
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)"
|
||||
git clone --branch dev 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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue