⚠️ API has degraded performance #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Hand-maintained (NOT generated by Upptime; update-template leaves it alone). | |
| # | |
| # Builds assets/status-ui/feed.xml, the Atom feed served at | |
| # https://status.experientiallabs.ai/feed.xml (via /api/feed, see | |
| # vercel/vercel.json). The feed is rendered from the SAME merged record the | |
| # page shows: scripts/build-feed.mjs evaluates the mergedIncidents block of | |
| # assets/status-ui/uptime-bars.js verbatim over incidents.json plus the live | |
| # `status` issues, so feed == page by construction. | |
| # | |
| # Rebuilt when an incident issue changes, when the curated record changes, | |
| # hourly as a fallback, or by hand. Commits only when the XML bytes changed, | |
| # so the hourly run is a no-op outside incidents. It pushes to main, so it | |
| # runs in Upptime's concurrency group (README: anything that pushes to main | |
| # must share Upptime's group) with the same rebase-and-retry loop. | |
| name: Feed | |
| on: | |
| issues: | |
| types: [opened, edited, closed, reopened, labeled, unlabeled] | |
| push: | |
| branches: [main] | |
| paths: | |
| - assets/status-ui/incidents.json | |
| - assets/status-ui/uptime-bars.js | |
| - scripts/build-feed.mjs | |
| schedule: | |
| - cron: "41 * * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.ref_name }}-upptime | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| issues: read | |
| jobs: | |
| build: | |
| name: Rebuild feed.xml | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| # Only incident issues matter (status label); maintenance and traffic-alert | |
| # issues never reach the feed. | |
| if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'status') | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| token: ${{ secrets.GH_PAT || github.token }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Fetch the live incident issues | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| gh api "repos/$REPO/issues?state=all&labels=status&per_page=100" --paginate --slurp \ | |
| | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write(JSON.stringify(JSON.parse(s).flat())))' \ | |
| > /tmp/issues.json | |
| echo "issues: $(node -e 'console.log(JSON.parse(require("fs").readFileSync("/tmp/issues.json")).length)')" | |
| - name: Build the feed | |
| run: node scripts/build-feed.mjs --issues /tmp/issues.json | |
| - name: Commit if changed | |
| run: | | |
| git config user.name "Upptime Bot" | |
| git config user.email "73812536+upptime-bot@users.noreply.github.com" | |
| git add assets/status-ui/feed.xml | |
| git diff --cached --quiet && { echo "No change."; exit 0; } | |
| git commit -m ":satellite: Refresh incident feed [skip ci]" | |
| # Upptime's bots commit to main every few minutes; rebase over | |
| # whatever landed while this job ran instead of failing the push. | |
| for _ in 1 2 3; do | |
| git push && exit 0 | |
| git pull --rebase --autostash && continue | |
| done | |
| exit 1 |