diff --git a/.github/workflows/auto-docs.yml b/.github/workflows/auto-docs.yml index 2046bc5f6d2..970e06fe676 100644 --- a/.github/workflows/auto-docs.yml +++ b/.github/workflows/auto-docs.yml @@ -25,6 +25,7 @@ concurrency: jobs: call-valtown: + if: github.repository == 'Kilo-Org/cloud' runs-on: ubuntu-latest timeout-minutes: 5 diff --git a/.github/workflows/bump-openclaw.yml b/.github/workflows/bump-openclaw.yml index 65f719c8f9a..a0bc0cc5ada 100644 --- a/.github/workflows/bump-openclaw.yml +++ b/.github/workflows/bump-openclaw.yml @@ -10,6 +10,7 @@ permissions: jobs: check: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 10 steps: diff --git a/.github/workflows/check-md-table-padding.yml b/.github/workflows/check-md-table-padding.yml index 54165d5bc93..ecee32c4580 100644 --- a/.github/workflows/check-md-table-padding.yml +++ b/.github/workflows/check-md-table-padding.yml @@ -9,6 +9,9 @@ on: jobs: check: name: Check markdown table padding + # Canonical-repo guard: no-op for pull_request (runs in the base-repo + # context, where validation is desired); skips manual dispatch runs in forks. + if: github.repository == 'Kilo-Org/cloud' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ebb0a840f05..5561fa66c1b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,6 +15,7 @@ permissions: jobs: analyze: name: Analyze (${{ matrix.language }}) + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 30 strategy: diff --git a/.github/workflows/deploy-kiloclaw.yml b/.github/workflows/deploy-kiloclaw.yml index ffcc299d4f0..7642fd7c193 100644 --- a/.github/workflows/deploy-kiloclaw.yml +++ b/.github/workflows/deploy-kiloclaw.yml @@ -11,6 +11,7 @@ permissions: jobs: deploy: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 30 name: Deploy KiloClaw @@ -251,7 +252,7 @@ jobs: # when its content was last built, so we don't pull a large unchanged image. attest-sbom: needs: deploy - if: needs.deploy.outputs.image-built == 'true' && needs.deploy.outputs.image-digest != '' + if: github.repository == 'Kilo-Org/cloud' && needs.deploy.outputs.image-built == 'true' && needs.deploy.outputs.image-digest != '' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 name: Attest image SBOM @@ -291,6 +292,7 @@ jobs: # continue-on-error ensures a dev push failure never blocks prod. push-dev-image: needs: [deploy] + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 10 name: Push Dev Image diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 34245d2fde9..affaa5d1b2e 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -20,6 +20,7 @@ env: jobs: check-production-db-startup: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 environment: production @@ -50,6 +51,7 @@ jobs: run: NODE_ENV=production pnpm exec tsx scripts/check-production-db-startup.ts run-migrations: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 environment: production @@ -80,6 +82,7 @@ jobs: run: NODE_ENV=production pnpm run drizzle migrate stage-app: + if: github.repository == 'Kilo-Org/cloud' uses: ./.github/workflows/stage-vercel-deployment.yml with: target_environment: production @@ -88,6 +91,7 @@ jobs: VERCEL_PROJECT_TOKEN: ${{ secrets.VERCEL_TOKEN_APP }} stage-global-app: + if: github.repository == 'Kilo-Org/cloud' uses: ./.github/workflows/stage-vercel-deployment.yml with: target_environment: production @@ -96,6 +100,7 @@ jobs: VERCEL_PROJECT_TOKEN: ${{ secrets.VERCEL_TOKEN_GLOBAL_APP }} promote-app: + if: github.repository == 'Kilo-Org/cloud' needs: [stage-app, check-production-db-startup, run-migrations] uses: ./.github/workflows/promote-vercel-deployment.yml with: @@ -106,6 +111,7 @@ jobs: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} promote-global-app: + if: github.repository == 'Kilo-Org/cloud' needs: [stage-global-app, check-production-db-startup, run-migrations] uses: ./.github/workflows/promote-vercel-deployment.yml with: @@ -114,6 +120,7 @@ jobs: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} resolve-worker-base: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 5 outputs: @@ -153,6 +160,7 @@ jobs: ] if: >- ${{ + github.repository == 'Kilo-Org/cloud' && !cancelled() && needs.check-production-db-startup.result == 'success' && needs.run-migrations.result == 'success' && @@ -168,6 +176,7 @@ jobs: secrets: inherit detect-gastown-wasteland-changes: + if: github.repository == 'Kilo-Org/cloud' needs: resolve-worker-base runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 5 @@ -244,6 +253,7 @@ jobs: ] if: >- ${{ + github.repository == 'Kilo-Org/cloud' && !cancelled() && needs.check-production-db-startup.result == 'success' && needs.run-migrations.result == 'success' && @@ -300,6 +310,7 @@ jobs: run: pnpm --filter cloudflare-gastown sentry:sourcemaps deploy-kiloclaw: + if: github.repository == 'Kilo-Org/cloud' needs: [check-production-db-startup, run-migrations] # Ceiling for the reusable workflow's GITHUB_TOKEN (a called workflow cannot # exceed the caller). The reusable workflow restricts further per job — only diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index a5663369ac1..1a2ea731197 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -16,6 +16,7 @@ concurrency: jobs: check-staging-db-startup: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 environment: staging @@ -46,6 +47,7 @@ jobs: run: NODE_ENV=production pnpm exec tsx scripts/check-production-db-startup.ts run-migrations: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 environment: staging @@ -76,6 +78,7 @@ jobs: run: NODE_ENV=production pnpm run drizzle migrate deploy-app: + if: github.repository == 'Kilo-Org/cloud' needs: [check-staging-db-startup, run-migrations] uses: ./.github/workflows/stage-vercel-deployment.yml with: @@ -85,6 +88,7 @@ jobs: VERCEL_PROJECT_TOKEN: ${{ secrets.VERCEL_TOKEN_APP }} deploy-global-app: + if: github.repository == 'Kilo-Org/cloud' needs: [check-staging-db-startup, run-migrations] uses: ./.github/workflows/stage-vercel-deployment.yml with: @@ -94,6 +98,7 @@ jobs: VERCEL_PROJECT_TOKEN: ${{ secrets.VERCEL_TOKEN_GLOBAL_APP }} deploy-workers: + if: github.repository == 'Kilo-Org/cloud' needs: [check-staging-db-startup, run-migrations, deploy-app, deploy-global-app] uses: ./.github/workflows/deploy-workers.yml with: diff --git a/.github/workflows/deploy-workers.yml b/.github/workflows/deploy-workers.yml index 45d99badbdf..9c4a0b0ab82 100644 --- a/.github/workflows/deploy-workers.yml +++ b/.github/workflows/deploy-workers.yml @@ -42,7 +42,7 @@ concurrency: jobs: deploy-manual: - if: inputs.worker != '' + if: github.repository == 'Kilo-Org/cloud' && inputs.worker != '' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 name: Deploy ${{ inputs.worker }} @@ -76,7 +76,7 @@ jobs: command: ${{ inputs.target_environment == 'production' && 'deploy' || format('deploy --env {0}', inputs.target_environment) }} detect-changes: - if: inputs.worker == '' && (inputs.base_sha != '' || inputs.target_environment != 'production') + if: github.repository == 'Kilo-Org/cloud' && inputs.worker == '' && (inputs.base_sha != '' || inputs.target_environment != 'production') runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 5 outputs: @@ -213,7 +213,7 @@ jobs: deploy-changed: needs: detect-changes - if: needs.detect-changes.outputs.matrix != '[]' && needs.detect-changes.outputs.matrix != '' + if: github.repository == 'Kilo-Org/cloud' && needs.detect-changes.outputs.matrix != '[]' && needs.detect-changes.outputs.matrix != '' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 environment: ${{ inputs.target_environment }} diff --git a/.github/workflows/extension-store-release.yml b/.github/workflows/extension-store-release.yml index a47cdf32599..8e2fdc168e1 100644 --- a/.github/workflows/extension-store-release.yml +++ b/.github/workflows/extension-store-release.yml @@ -18,6 +18,7 @@ permissions: jobs: build-artifacts: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 30 env: @@ -87,7 +88,7 @@ jobs: needs: build-artifacts # Only a main dispatch bumps: a branch dispatch would open a PR carrying # unrelated commits. - if: github.ref == 'refs/heads/main' + if: github.repository == 'Kilo-Org/cloud' && github.ref == 'refs/heads/main' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 10 permissions: diff --git a/.github/workflows/kilo-app-release.yml b/.github/workflows/kilo-app-release.yml index 4191abe6897..cb58c265ad9 100644 --- a/.github/workflows/kilo-app-release.yml +++ b/.github/workflows/kilo-app-release.yml @@ -29,6 +29,7 @@ permissions: jobs: check-changes: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 5 permissions: @@ -86,11 +87,12 @@ jobs: fi validate: + if: github.repository == 'Kilo-Org/cloud' uses: ./.github/workflows/kilo-app-ci.yml preflight: needs: [check-changes] - if: needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main' + if: github.repository == 'Kilo-Org/cloud' && needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 permissions: @@ -155,7 +157,7 @@ jobs: build-and-submit: needs: [check-changes, validate, preflight] - if: needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main' + if: github.repository == 'Kilo-Org/cloud' && needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 60 steps: @@ -241,7 +243,7 @@ jobs: # The build number is not bumped here; EAS auto-increments it remotely. bump-version: needs: [check-changes] - if: needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main' + if: github.repository == 'Kilo-Org/cloud' && needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 10 permissions: diff --git a/.github/workflows/promote-vercel-deployment.yml b/.github/workflows/promote-vercel-deployment.yml index 7fa1115ce28..861e245fac9 100644 --- a/.github/workflows/promote-vercel-deployment.yml +++ b/.github/workflows/promote-vercel-deployment.yml @@ -30,6 +30,7 @@ permissions: jobs: promote: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 15 environment: production diff --git a/.github/workflows/push-dev-kiloclaw.yml b/.github/workflows/push-dev-kiloclaw.yml index 4e6aec116bf..54019d8d6b9 100644 --- a/.github/workflows/push-dev-kiloclaw.yml +++ b/.github/workflows/push-dev-kiloclaw.yml @@ -9,6 +9,7 @@ permissions: jobs: push-dev: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 30 name: Build & Push Dev Image diff --git a/.github/workflows/redeploy-web.yml b/.github/workflows/redeploy-web.yml index 828b4a7a02c..1888e6ea27c 100644 --- a/.github/workflows/redeploy-web.yml +++ b/.github/workflows/redeploy-web.yml @@ -12,6 +12,7 @@ concurrency: jobs: verify-main: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 5 @@ -24,6 +25,7 @@ jobs: fi stage-app: + if: github.repository == 'Kilo-Org/cloud' needs: verify-main uses: ./.github/workflows/stage-vercel-deployment.yml with: @@ -33,6 +35,7 @@ jobs: VERCEL_PROJECT_TOKEN: ${{ secrets.VERCEL_TOKEN_APP }} stage-global-app: + if: github.repository == 'Kilo-Org/cloud' needs: verify-main uses: ./.github/workflows/stage-vercel-deployment.yml with: @@ -42,6 +45,7 @@ jobs: VERCEL_PROJECT_TOKEN: ${{ secrets.VERCEL_TOKEN_GLOBAL_APP }} promote-app: + if: github.repository == 'Kilo-Org/cloud' needs: stage-app uses: ./.github/workflows/promote-vercel-deployment.yml with: @@ -52,6 +56,7 @@ jobs: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} promote-global-app: + if: github.repository == 'Kilo-Org/cloud' needs: stage-global-app uses: ./.github/workflows/promote-vercel-deployment.yml with: diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml index 84b92eab8d4..cf9af84595e 100644 --- a/.github/workflows/sbom.yml +++ b/.github/workflows/sbom.yml @@ -22,6 +22,7 @@ permissions: jobs: source-sbom: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 10 name: Source dependency SBOM diff --git a/.github/workflows/setup-smoke.yml b/.github/workflows/setup-smoke.yml index b75f5bcb463..ac4978486e5 100644 --- a/.github/workflows/setup-smoke.yml +++ b/.github/workflows/setup-smoke.yml @@ -25,6 +25,9 @@ concurrency: jobs: setup-smoke: + # Canonical-repo guard: no-op for pull_request (runs in the base-repo + # context, where validation is desired); skips schedule/dispatch runs in forks. + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_LARGE_LABEL || 'ubuntu-24.04-8core' }} timeout-minutes: 45 diff --git a/.github/workflows/stage-vercel-deployment.yml b/.github/workflows/stage-vercel-deployment.yml index df0fbadf4e0..7d49ef0c4e1 100644 --- a/.github/workflows/stage-vercel-deployment.yml +++ b/.github/workflows/stage-vercel-deployment.yml @@ -25,6 +25,7 @@ permissions: jobs: stage: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 30 environment: ${{ inputs.target_environment }} diff --git a/.github/workflows/stale-prs.yaml b/.github/workflows/stale-prs.yaml index ebb86730fed..2149568d906 100644 --- a/.github/workflows/stale-prs.yaml +++ b/.github/workflows/stale-prs.yaml @@ -6,6 +6,7 @@ on: jobs: stale: + if: github.repository == 'Kilo-Org/cloud' runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} permissions: issues: write