From b1f85cc22444fa2e59a042dfef0035561f9724a1 Mon Sep 17 00:00:00 2001 From: Tyler Cloutier Date: Mon, 11 May 2026 14:49:34 -0400 Subject: [PATCH] CI: skip Internal Tests dispatch for docs-only changes Docs-only PRs don't exercise anything covered by the private internal-test workflow, so dispatching it just burns private-runner time. Add a paths- filter step to internal-tests and gate the dispatch/wait steps on any non-docs file changing; the job itself still completes so required- status-check gating is satisfied. --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d572566f4db..45feedaaf4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -869,13 +869,26 @@ jobs: && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) }} permissions: contents: read + pull-requests: read runs-on: ubuntu-latest env: TARGET_OWNER: clockworklabs TARGET_REPO: SpacetimeDBPrivate steps: + # Skip the private dispatch entirely when only `docs/` is touched. The job + # itself still completes successfully so required-status-check gating is + # satisfied without spending private-runner time on a docs-only change. + - name: Detect non-docs changes + id: filter + uses: dorny/paths-filter@v3 + with: + filters: | + non_docs: + - '!docs/**' + - id: dispatch name: Trigger tests + if: steps.filter.outputs.non_docs == 'true' uses: actions/github-script@v7 with: github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} @@ -939,6 +952,7 @@ jobs: core.setOutput('run_url', runUrl); - name: Wait for Internal Tests to complete + if: steps.filter.outputs.non_docs == 'true' uses: actions/github-script@v7 with: github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} @@ -976,7 +990,7 @@ jobs: } - name: Cancel invoked run if workflow cancelled - if: ${{ cancelled() }} + if: ${{ cancelled() && steps.dispatch.outputs.run_id }} uses: actions/github-script@v7 with: github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }}