Skip to content

ci(pr): run a secret-free smoke on PRs, full matrix on demand - #5269

Merged
mudler merged 2 commits into
kairos-io:masterfrom
ci-forks:ci/pr-smoke-full-on-master
Oct 6, 2026
Merged

mudler merged 2 commits into
kairos-io:masterfrom
ci-forks:ci/pr-smoke-full-on-master

Conversation

@ci-robbot

@ci-robbot ci-robbot commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

PR CI ran the full matrix on every push and, for any PR from a fork, waited in the fork-pr-builds environment first. Almost every PR here is now opened by an agent from a fork: 92 of 135 open PRs come from ci-forks alone. When this was written, 96 PR runs were waiting for approval. Every approved push then started about 60 jobs. Agents also run QA on a real boot before merge, so the full matrix now runs on master only, and on a PR only when a maintainer asks for it.

Changes:

  • pr.yaml now uses the plain pull_request trigger, with no secrets, no environment and no approval. It runs:

    • unit tests and lint
    • the kairos, kairos-init and kcrypt-challenger binary builds
    • the kairos-init image build
    • one amd64 Hadron core ISO
    • the qemu install and acceptance suites
    • the ISO size diff

    Nothing is pushed.

  • The kairos-init image reaches the ISO build as an OCI layout artifact, not as a registry image:

    • _build-image-kairos-init.yaml gets an oci_artifact input.
    • reusable-factory.yaml gets oci_context_artifact and oci_context_name, which bind the layout as a named build context for the FROM ${KAIROS_INIT_IMAGE}.
    • _build-iso.yaml passes these through as kairos_init_artifact.
  • _build-iso.yaml gets a security_scans switch, default true. The smoke turns it off because a fork's read-only token cannot upload SARIF. master still scans every image.

  • pr-full.yaml is the old pr.yaml, now triggered only by the ci/full label (pull_request_target, types: [labeled]). There is no environment. The authorize job:

    • fails unless the person who added the label has write, maintain or admin access, because triage can add labels too
    • removes the label, so adding it again runs the matrix on a later push

    Every checkout is pinned to pull_request.head.sha from the label event, so a push after the label does not change what runs. The CodeQL rationale in the header is updated to match.

  • pr-fork-checks.yaml is removed. pr.yaml now covers fork PRs without a gate.

  • master.yaml is unchanged apart from comments that now point to pr-full.yaml. The Makefile workflow-lint lists include pr-full.yaml.

Before merge, a maintainer needs to:

  • create the ci/full label. It does not exist yet, and I could not create it because this account has triage access only.
  • decide whether to delete the fork-pr-builds environment. Nothing references it after this change.

Note on trust: any account with write access can start pr-full.yaml by adding the label, bot accounts included. Adding the label is the review of the diff.

How it was checked:

  • make lint-workflows (yamllint strict and actionlint) passes.
  • actionlint on reusable-factory.yaml reports the same 107 existing shellcheck findings on master and on this branch, so the change adds none.
  • I checked locally that BuildKit resolves FROM ${KAIROS_INIT_IMAGE} from an oci-layout:// build context made by buildx --output type=oci from a two-platform build, with --load.
  • This PR comes from a fork, so its own PR run is the end-to-end test of the new smoke path: no approval, read-only token, no registry. pr-full.yaml cannot run on this PR, because pull_request_target uses the workflow from master. It can only be tried after merge, with the label.
  • Result of that run: run 37469696401 started with no approval and passed all 24 jobs in about 15 minutes. That includes the ISO built from the local kairos-init layout and the qemu install and acceptance suites. An earlier run on the older base failed install with the master: test-core install is red on both legs because a top-level bundles: entry never lands its files #5132 bundles regression, which fix(sysext): stop merging extensions over the persistent partition #5115 fixed in the meantime. The rebase onto current master made it green.

Which issue(s) this PR fixes:
Fixes #4296

AI disclosure: Claude Code wrote this change and the description, at the request of a maintainer (@mudler). No human read the code before this PR was opened.

🤖 Generated with Claude Code

@ci-robbot
ci-robbot requested a review from a team as a code owner October 6, 2026 12:55
@ci-robbot
ci-robbot force-pushed the ci/pr-smoke-full-on-master branch from 78f21df to 7d576e0 Compare October 6, 2026 12:56
mudler and others added 2 commits October 6, 2026 13:17
Every push to a fork PR waited in the fork-pr-builds environment for a
maintainer, and every approved push then started about 60 jobs. Most
PRs here come from agent forks and get QA on a real boot, so the full
matrix on each push was mostly queue and cost. 96 runs were waiting
for approval when this change was written.

pr.yaml now runs on plain pull_request with no secrets and no approval:
unit tests, lint, the binary builds, the kairos-init image, one amd64
Hadron core ISO and the qemu install and acceptance suites. kairos-init
reaches the ISO build as an OCI layout artifact, through a new
oci_context_artifact input on the factory, because the run has no
registry to push to. _build-iso.yaml gets a security_scans switch,
since a fork's read-only token cannot upload SARIF.

The old pipeline moves to pr-full.yaml. It runs only when somebody with
write access adds the ci/full label. It builds the head commit from the
label event, and its authorize job checks the labeler's permission and
removes the label, instead of waiting on an environment. master.yaml
still runs the full matrix on every push.

pr-fork-checks.yaml is removed, because pr.yaml now covers fork PRs.

Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The pull_request_target pipeline on master still uses the ci-pr- group,
so it cancelled the smoke run on this branch as soon as both started.

Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mudler
mudler merged commit 5a87e85 into kairos-io:master Oct 6, 2026
25 of 27 checks passed
itxaka-agent added a commit to itxaka-agent/kairos that referenced this pull request Oct 6, 2026
master split the PR pipeline (kairos-io#5269): pr.yaml is now a smoke run that
builds only the amd64 core ISO, and the full matrix with the UKI ISOs
moved to pr-full.yaml. The UKI size gate goes with them into
pr-full.yaml's size-diff job. pr.yaml keeps the script's own test so it
still runs on every PR.

Also picks up 70e24cf, which fixes the edgevpn bundle failure in the
install test.

Co-authored-by: Itxaka <itxakaserrano@gmail.com>
Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
fork-pr-builds — 5975b310 Deployed Oct 6, 2026 by ci-robbot via authorize #1090
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.

CI: collaborators' PRs still need manual approval to run workflows

3 participants