Skip to content

Optionally start the CI k8s workflows next to needs_ci - #35

Open
asheth-eightfold wants to merge 5 commits into
masterfrom
ci-k8s-request-labels
Open

asheth-eightfold wants to merge 5 commits into
masterfrom
ci-k8s-request-labels

Conversation

@asheth-eightfold

@asheth-eightfold asheth-eightfold commented Oct 19, 2026 •

Copy link
Copy Markdown

Optionally starts a second CI system next to the existing needs_ci / needs_ci:lite requests. It adds no new label and doesn't change the existing ones.

Behaviour

  • One switch: CI_K8S_TRIGGER, passed in by the calling workflow as an environment variable. Only exactly true turns it on. Unset means false, so behaviour is unchanged.
  • Labels are untouched: needs_ci and needs_ci:lite are always added, under the same conditions as today.
  • When the switch is true: every place that adds needs_ci / needs_ci:lite also starts the matching workflow in the calling repository (ci_k8s_full.yml / ci_k8s_lite.yml) with workflow_dispatch.
    • workflow_dispatch is the one event GITHUB_TOKEN may start, and it needs actions: write on the caller's GITHUB_TOKEN.
    • A label already on the PR gets no dispatch. The second CI runs on that label itself.
  • No same-repository check: the calling repository allows no forks.
  • Sandbox labels are not changed.

Testing
The script was run against a fake curl that records every GitHub API call:

  • With CI_K8S_TRIGGER unset, false or empty: exactly the same API calls as the current script in every scenario.
  • With it true, the expected labels and dispatches were checked for:
    • the comment, approval and push rules;
    • a label already present;
    • values other than exactly true.

🤖 Generated with Claude Code

Two switches from the calling workflow, CI_FLEET_TRIGGER (default true) and
CI_K8S_TRIGGER (default false). When CI_K8S_TRIGGER is true, wherever needs_ci or
needs_ci:lite is requested, also add ci_k8s / ci_k8s:lite and start the matching
workflow with workflow_dispatch. Same-repository PRs only. Unchanged when unset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

CI k8s is started exactly when needs_ci / needs_ci:lite would be requested, and
adds no label of its own. On a push, the modes the fleet runs for the new commit
(the label just added, and any needs_ci* already on) are started again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@asheth-eightfold asheth-eightfold changed the title Optionally request the ci_k8s labels next to needs_ci Optionally start the CI k8s workflows next to needs_ci Oct 19, 2026
asheth-eightfold and others added 3 commits October 20, 2026 00:04
One switch from the calling workflow, CI_K8S_TRIGGER (default false). needs_ci and
needs_ci:lite are always added, exactly as today; when CI_K8S_TRIGGER is true, each
add is followed by a workflow_dispatch of the matching CI k8s workflow (same-repository
PRs only). CI_FLEET_TRIGGER is gone. Unchanged when unset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The calling repository allows no forks, so every pull request is from the same
repository. Also fold the dispatch helper into k8s_request, its only caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant