Skip to content

One workflow: checks, dry run, then the approved apply - #4

Merged
TakGN merged 2 commits into
mainfrom
one-ci-workflow
Oct 13, 2026
Merged

TakGN merged 2 commits into
mainfrom
one-ci-workflow

Conversation

@TakGN

@TakGN TakGN commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

A merge started two runs (checks and platform), and its apply followed the checks without a dry run of the commit being applied.

Now: one workflow, one run, in this order

merge -> ansible · manifests · generated · shell + changes
      -> platform-dry-run  (what would change, written to the run's summary)
      -> platform-apply    (approval in `production`) -> platform.yml
  • platform.yml is deleted; its jobs live in ci.yml.
  • changes decides whether the run touches what platform.yml applies (platform.yml, its roles, route_origin defaults, group_vars/, inventory/, scripts/ci-platform.sh, the workflow). On a PR it diffs against where the branch left main. Tested on real ranges: Install Argo CD on lith-1 and open the ports monitoring needs #2 and Apply platform.yml only after the checks pass, and never cancel a pending apply #3 merges → yes; a content-role-only change → no; a group_vars change for another service → yes (then the dry run shows it changes nothing).
  • platform-dry-run runs after every check passes: on PRs from this repo, on merges, and on manual runs. It writes a table of what would change, per box and task, plus failures and the play recap, to the run's summary page. Tested with a stubbed playbook, passing and failing (a failure fails the job, so no apply is offered).
  • platform-apply needs the checks and the dry run of the same commit, and waits for approval in production: approve after reading the dry run's summary.
  • Concurrency: on main the dry run and apply queue together in platform-main (a dry run never runs while an apply changes the boxes; a newer merge replaces an older one still waiting for approval). PR dry runs keep their own per-branch group, so they cannot cancel a pending apply (the Apply platform.yml only after the checks pass, and never cancel a pending apply #3 fix).
  • Manual: Actions → ci → Run workflow, platform: none | check | apply, optional limit.

Checked

actionlint (with shellcheck of inline scripts), shellcheck scripts/*.sh, yamllint, ansible-lint (production, 0 failures); the summary rendering with a stub.

Merging

Merging touches the workflow, so its run dry-runs platform.yml and offers the apply for approval. After the pending apply from #3's merge has run, this one should show nothing to change.

🤖 Generated with Claude Code

TakGN and others added 2 commits October 13, 2026 14:31
A merge started two runs: checks (ci.yml) and platform (platform.yml, which
since #3 also ran the checks itself before applying). The platform jobs now
live in ci.yml and platform.yml is gone, so a merge starts one run: the four
checks, then, if the merge touches what platform.yml applies, the apply,
which needs every check and waits for approval in `production`. Pull
requests get the checks and, when relevant, the dry run. A new `changes` job
decides relevance (on a PR, against where the branch left main).

The concurrency groups from #3 are kept: dry runs per branch, applies in
platform-apply, so a dry run never cancels a pending apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a merge, the apply followed the checks directly, so the approver never saw
what it would do to the boxes for the commit being applied. Now a merge (and
a manual apply) runs the checks, then a dry run of that commit, then the
apply, which needs the dry run. Each dry run in CI writes what it would
change, per box and task, to the run's summary page.

On main the dry run and the apply queue together in platform-main, so a dry
run never runs while an apply changes the boxes, and a newer merge replaces
an older one still waiting for approval. Pull request dry runs keep their own
per-branch group, so they still cannot cancel a pending apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TakGN TakGN changed the title One workflow: the checks, then platform.yml, in a single run One workflow: checks, dry run, then the approved apply Oct 13, 2026
@TakGN
TakGN merged commit 4f57f8b into main Oct 13, 2026
7 checks passed
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