fix(ci): auto-deploy ARC runners on push to main#160
Conversation
Remove environment gate from apply job — PR review is the safety gate. Auto-deploy on push to main prevents local/CI state drift. Also widen path trigger to include runners/ directory (Dockerfile changes).
Greptile SummaryThis PR removes the Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Plan as plan job
participant Apply as apply job
participant Verify as verify job
participant Infra as ARC Infra (Civo/K8s)
Note over Dev,Infra: PR workflow (pull_request event)
Dev->>GH: Open PR (tofu/** changes)
GH->>Plan: Trigger plan job
Plan->>Infra: tofu plan (read-only)
Plan-->>GH: has-changes output + plan artifact
Note over GH: Plan summary posted to PR step summary
Note over Dev,Infra: Merge to main (push event)
Dev->>GH: Merge PR → push to main
GH->>Plan: Trigger plan job
Plan->>Infra: tofu plan -detailed-exitcode
Plan-->>Apply: has-changes=true (artifact)
Note over GH: No environment gate (removed in this PR)
Apply->>Infra: tofu apply -auto-approve tfplan
Apply-->>Verify: apply complete
Verify->>Infra: Verify runners on tinyland-docker
Note over Dev,Infra: Manual workflow_dispatch (action=apply)
Dev->>GH: workflow_dispatch (action=apply)
GH->>Plan: Trigger plan job
Plan-->>Apply: has-changes=true
Note over GH: No approval gate (previously required env gate)
Apply->>Infra: tofu apply -auto-approve tfplan
|
Summary
environment: arc-runnersgate from the apply jobrunners/**to path trigger so Dockerfile changes trigger deploysWhy
The environment gate caused the apply to skip on every push to main, requiring manual local
tofu applyruns. This creates local/CI state drift — the exact thing IaC is supposed to prevent.Test plan
has-changes && push to main)