ci: run infra steps only when their area changed (+ ansible↔tofu x-dep) #112
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!112
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "chore/ci-path-filters"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Stops the CI job running the full toolchain (apt install, tofu download, ansible pip, image-pull smokes) on every PR — docs-only PRs now run just prettier + markdownlint.
Gating
A
Detect changed areasstep diffs the PR base and sets outputs; each infra step isif:-gated:opentofu/changedansible/changed (smokes also onscripts/)scripts/changedCross-dependency (the part you flagged)
Per the infra-apply model — OpenTofu provisions the host, Ansible configures it ("do OpenTofu first") — the dependency is directional:
Anything outside
ansible/opentofu/scripts/docs(root config, this workflow, package.json) runs everything; if the base diff can't be resolved it fails safe to all. Full functional cross-stack validation (converge Ansible on a tofu-provisioned host) is Tier-1, not this static CI (bitborg-docs#37 / #105).Validated
Table-tested the detection logic across docs-only / ansible-only / tofu-only / scripts-only / combined / root / fallback — flags resolve correctly, including tofu-only → ansible=true. Workflow YAML parses (12 steps, gates as intended); prettier clean.
Note: needs
fetch-depth: 0on checkout for the base diff (added).