Every Check Green, and GitHub Still Refuses to Merge

Here is a failure that will cost you an afternoon if you have not seen it before. You open a pull request. Every required status check goes green. There are no unresolved review threads. The GitHub UI says the branch has no conflicts. You click merge, and: X Pull request ... is not mergeable: the base branch policy prohibits the merge. No indication of which policy. No indication of which rule. You push another commit, wait for CI again, try again, and get the identical message. Meanwhile other pull requests in the same repository merge without complaint, so it looks like something specific to this branch, or like GitHub is having a bad day. ...

13 September 2026 · 6 min · Albert Asawaroengchai

From Commit to Cluster: A GitOps CI/CD Pipeline with GitHub Actions and ArgoCD

There is a gap between “I understand CI/CD in theory” and “I have built one and watched it work.” This post closes that gap. We will build a complete, production-patterned GitOps pipeline from scratch — running entirely on your local machine, at zero cost — and walk through every stage from raising a pull request to deploying to production. The two repos for this tutorial are: service-demo — the application code, Helm chart, and GitHub Actions workflows gitops-demo — the GitOps source of truth: ArgoCD configuration, environment values, and infrastructure bootstrap What We Are Building Developer pushes feature branch → PR opened → CI: lint, SCA, unit tests, integration tests → Image built → pushed to GHCR → Ephemeral environment pr-{N} deployed by ArgoCD (dev cluster) → Smoke tests run against ephemeral env → CODEOWNER approves → PR merged → CD: image built from main → main-{sha} → ArgoCD syncs preprod namespace (preprod cluster) → Full test suite runs against preprod → Check run posted to merge commit (release gate) → [Manual] Release workflow triggered → Preflight: HEAD commit must have passing preprod gate → Image retagged: main-{sha} → v{X.Y.Z} (no rebuild) → ArgoCD syncs prod namespace (prod cluster) → ArgoCD syncs dev namespace (dev cluster) — same tag, same bits For this tutorial, all four environments run as Kubernetes namespaces on a single local kind cluster — simple to bootstrap and zero infrastructure cost. In production the topology is different: ephemeral environments and dev share a single dev cluster, while preprod and prod each get their own. More on this in Production Considerations. ...

28 March 2026 · 18 min · Albert Asawaroengchai