diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52f8f1f..8ab745f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,10 @@ on: jobs: build: - runs-on: ubuntu-latest + # Our runners only (the org's GitHub Actions budget is capped). A fork's + # PR never runs on our machines. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + runs-on: [self-hosted, Linux, ARM64, neboloop] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/no-hosted-runners.yml b/.github/workflows/no-hosted-runners.yml new file mode 100644 index 0000000..576871b --- /dev/null +++ b/.github/workflows/no-hosted-runners.yml @@ -0,0 +1,36 @@ +name: No GitHub-hosted runners + +# Every NeboLoop workflow runs on our own machines (the stadium Mac mini's +# runners, the house Windows box, or a per-run DigitalOcean droplet): the +# org's GitHub Actions budget is capped. Fails a PR whose workflows name a +# GitHub-hosted label (ubuntu-*, macos-*, windows-*). The same check as +# NeboLoop/stadium-runners' reusable no-hosted-runners.yml, inlined because a +# public repo cannot call a workflow in a private one. Only .github/ is checked +# out and nothing from the PR is executed. +on: + pull_request: + paths: [".github/**"] + +permissions: + contents: read + +jobs: + check: + runs-on: [self-hosted, Linux, ARM64, neboloop-orch] + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: .github + - name: Workflows use our runners only + run: | + shopt -s nullglob + bad=$(for f in .github/workflows/*.yml .github/workflows/*.yaml; do + sed 's/#.*//' "$f" | grep -nE '\b(ubuntu|macos|windows)-(latest|slim|[0-9])' | sed "s|^|$f:|" + done) + if [ -n "$bad" ]; then + echo "::error::GitHub-hosted runners are not used in NeboLoop. Use [self-hosted, Linux, ARM64, neboloop] (light), neboloop-orch (orchestration), stadium-mac, stadium-win, or a per-run droplet." + echo "$bad" + exit 1 + fi + echo "no GitHub-hosted runner labels" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12cf6ef..e66a963 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ permissions: jobs: publish: - runs-on: ubuntu-latest + runs-on: [self-hosted, Linux, ARM64, neboloop] steps: - uses: actions/checkout@v4 diff --git a/package.json b/package.json index 28db96d..e312724 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ } }, "devDependencies": { + "@a2ui/web_core": "^0.9.2", "@types/node": "^25.6.2", "typescript": "^5.9.0", "vite": "^6.0.0"