Self-hosted CI/CD Pipeline
Challenge & Solution
I designed and implemented a complete CI/CD pipeline on self-hosted infrastructure, connecting GitHub Actions, Terraform and Kubernetes. The workflow builds and publishes a FastAPI service, provisions an ECR repository through Floci and updates the cluster using a GitOps pattern, without requiring a real AWS account.
Pipeline Architecture
Push to main
GitHub triggers the workflow.
Docker build
The runner creates an image tagged with the commit hash.
Terraform apply
It ensures the emulated ECR and remote state exist.
Push to ECR
The versioned image is published to the registry.
GitOps deploy
The manifest is updated, applied and rolled out.
Commit [skip ci]
Git records the deployed state without creating loops.
Key Decisions
GitOps as the single source of truth: the updated manifest is committed back to the repository.
Emulated S3 remote backend to preserve Terraform state between pipeline runs.
Unique commit tags instead of latest for deterministic Kubernetes deployments.
Credentials kept out of version control through variables and external configuration.