mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 13:08:10 +00:00
64 lines
2.5 KiB
YAML
64 lines
2.5 KiB
YAML
name: Release Build 124 after Vercel quota reset
|
|
|
|
on:
|
|
schedule:
|
|
# Vercel's Hobby deployment quota is rolling. Retry across the reset
|
|
# window, then remove this workflow as soon as Build 124 is live.
|
|
- cron: "15 1-23/2 23 8 *"
|
|
- cron: "15 1-13/2 24 8 *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: release-build-124
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 35
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: main
|
|
fetch-depth: 0
|
|
- name: Trigger the deferred Vercel deployment
|
|
env:
|
|
ARENA_URL: https://polymarket-site-eta.vercel.app
|
|
run: |
|
|
if curl --fail --silent --show-error "${ARENA_URL}/?build_124_preflight=${GITHUB_RUN_ID}" | grep -q 'const BUILD_VERSION = 124;'; then
|
|
echo "Build 124 is already live."
|
|
exit 0
|
|
fi
|
|
printf 'Build 124 deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .build-124-release-trigger
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add .build-124-release-trigger
|
|
git commit -m "Retry Build 124 production deployment"
|
|
git push origin HEAD:main
|
|
- name: Wait for Build 124 in production
|
|
env:
|
|
ARENA_URL: https://polymarket-site-eta.vercel.app
|
|
run: |
|
|
for attempt in $(seq 1 40); do
|
|
if curl --fail --silent --show-error "${ARENA_URL}/?build_124_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'const BUILD_VERSION = 124;'; then
|
|
echo "Build 124 is live."
|
|
exit 0
|
|
fi
|
|
sleep 30
|
|
done
|
|
echo "Build 124 did not become live; Build 118 remains the autonomous runtime target."
|
|
exit 1
|
|
- name: Activate the Build 124 autonomous runner
|
|
run: |
|
|
git pull --ff-only origin main
|
|
perl -0pi -e 's/EXPECTED_BUILD: "118"/EXPECTED_BUILD: "124"/' .github/workflows/autonomous-cycle.yml
|
|
perl -0pi -e 's/assert\.match\(workflow, \/EXPECTED_BUILD: "118"\/\);/assert.match(workflow, \/EXPECTED_BUILD: "124"\/);/' scripts/test-autonomous-runtime.mjs
|
|
rm -f .build-124-release-trigger
|
|
git rm .github/workflows/release-build-124.yml
|
|
git add .github/workflows/autonomous-cycle.yml scripts/test-autonomous-runtime.mjs
|
|
git commit -m "Activate Build 124 autonomous cycles"
|
|
git push origin HEAD:main
|