Skip to content

docs(gitops): plan-on-PR workflow template (I1)#153

Merged
astrojerms merged 1 commit into
mainfrom
docs/i1-plan-on-pr
Jul 20, 2026
Merged

docs(gitops): plan-on-PR workflow template (I1)#153
astrojerms merged 1 commit into
mainfrom
docs/i1-plan-on-pr

Conversation

@astrojerms

Copy link
Copy Markdown
Owner

I1 — plan-on-PR

A reusable GitHub Actions workflow template that runs openctl plan (K7) on every PR touching manifests and posts the apply order + $ref dependency graph as a sticky PR comment — the PR-gated front half of the DriftlessAF loop (the controller reconciles on merge/webhook via B1–B3).

examples/gitops-pr-plan/:

  • plan.yml — the workflow (copy into your infra repo's .github/workflows/).
  • README.md — adoption + scope.

Properties

  • Offlineopenctl plan needs no controller connection.
  • Self-contained — only gh (preinstalled) + pull-requests: write; no third-party actions.
  • Sticky comment — updates one comment in place (via gh api + a hidden marker) instead of spamming.
  • Gating — a dependency cycle makes openctl plan exit non-zero → the check fails and blocks merge.
  • Kept out of .github/workflows/ on purpose — it's a template for your repo; it must not run on openctl's own.

Scope

Ordering + dependency graph only. Per-resource dry-run diffs (spec drift vs the live cluster) are server-only (need a running controller's DryRunApply) and are intentionally out of scope for this offline preview — consistent with K7.

Docs/example only — no Go changes.

Add examples/gitops-pr-plan/ — a reusable GitHub Actions workflow that
runs `openctl plan` (K7) on every PR touching manifests and posts the
apply order + $ref dependency graph as a sticky PR comment, so a reviewer
sees what will happen, in what order, and what waits on what before merge.
The PR-gated front half of the DriftlessAF loop (the controller reconciles
on merge/webhook via B1-B3).

Kept under examples/ (NOT .github/workflows/) so it doesn't run on
openctl's own repo — it's a template to copy into a user's infra repo.
Offline (no controller), self-contained (only `gh` + pull-requests:write),
sticky comment (update-in-place via gh api), and a dependency cycle makes
`openctl plan` exit non-zero → the check fails and blocks merge. README
covers adoption + scope (per-resource diffs are server-only, out of scope).
@astrojerms
astrojerms merged commit f44b518 into main Jul 20, 2026
6 checks passed
@astrojerms
astrojerms deleted the docs/i1-plan-on-pr branch July 20, 2026 01:16
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