Pack CI/CD — Del Primer Workflow al Deploy Gate
Monta un pipeline real de extremo a extremo: GitHub Actions / GitLab CI / Dagger, caché de BuildKit, builds matriciales, gestión de secretos con sops + Infisical + Gitleaks, y un gate de despliegue sin caídas con Kamal. Configs amigables para que un agente IA los genere, depure y optimice.
What's in this pack
Most CI/CD how-tos hand you a 200-line .github/workflows/ci.yml and call it done. That works for a hobby project — it does not work for a real pipeline that has to survive matrix builds, slow caches, leaked secrets, and a 2 a.m. failed deploy. This pack is the opposite angle: ten open-source picks installed in a deliberate order, each one earning its place by solving a problem the previous step exposed.
Every pick is open-source, actively maintained, and produces a config file an AI agent can read, generate, or debug. No hosted-only black boxes. By the end you have a pipeline that runs locally, runs in CI, caches aggressively, scans for secrets, and only ships green builds.
Install in this order
- actionlint — Lint your workflow YAML before you push. Catches typos in
uses:, brokenif:expressions, and bad shell escapes that would otherwise burn a 4-minute CI run. Run as a pre-commit hook. Zero excuses. - act — Run GitHub Actions locally in Docker. The single biggest CI iteration killer is the
commit → push → wait 5 min → see red → repeatloop.actcuts that to seconds. Pair with actionlint and you debug workflows the way you debug code. - Super-Linter — Drop-in multi-language linter aggregator from GitHub. One step in your workflow, 50+ linters under the hood (shellcheck, hadolint, yamllint, eslint, ruff). Stops style debates by making the CI the source of truth.
- BuildKit — Modern OCI image builder with parallel layers and cache-mount support. Once your build runs through BuildKit,
RUN apt-getandRUN npm cisurvive across commits via--mount=type=cache. Typical CI cuts: 8 min → 90 sec for a Node + Python service. - Dagger — Programmable CI/CD engine: pipelines as actual code (Go, Python, TypeScript), runs identically on GitHub Actions, GitLab CI, Buildkite, or your laptop. The moment your
.ymlexceeds 300 lines, you reach for Dagger and never look back. Provider lock-in goes away in one afternoon. - Concourse — Container-native CI with declarative pipelines for self-hosted setups. When you can't put proprietary code on hosted CI, Concourse is the sane open-source alternative. Pipelines live in YAML, every step is a container, state lives in S3 or a PG.
- Gitleaks — Static secret scanner. One step in your pipeline that fails the build if an AWS key, GitHub token, or JWT slips into a commit. Catches the 5% of secret leaks that all the careful coding in the world won't prevent.
- sops — Mozilla's encrypted-file secrets manager. Commit
secrets.enc.yamlto git, decrypt at deploy time with KMS / age / PGP. Tiny, no service to run, perfect for the 80% of teams that don't yet need Vault. - Infisical — Open-source secret management service when sops stops scaling. Web UI, role-based access, CI integrations for GitHub Actions / GitLab / Vercel. The graduation path from sops, before you reach for HashiCorp Vault.
- Kamal — Zero-downtime Docker deploy tool. After CI passes, Kamal handles the rolling deploy with health checks across one or many servers. Replaces the messy
ssh && docker pull && docker restartscript every team writes and regrets.
How they fit together
Write workflow.yml
│
├─ actionlint (local, pre-commit)
│
├─ act (local, docker-compose for CI)
│
CI runs ──┐
├─ Super-Linter step (style + correctness)
├─ BuildKit step (cached docker build)
├─ Dagger pipeline (portable across providers)
│ └─ or Concourse (self-hosted alt)
├─ Gitleaks scan step (block on secret leak)
└─ sops decrypt step (inject secrets at runtime)
└─ Infisical (if team > 5 people)
│
▼
Kamal deploy (zero-downtime gate)
The actionlint + act + Super-Linter triad is the cheap-but-massive iteration win — most teams skip it and waste hours on red CI per week. The Dagger + BuildKit pairing is the long-term lock-in escape: if your CI YAML feels brittle, this is the rewrite path. sops first, Infisical when you grow is the right secrets ramp; jumping straight to Vault for a 3-person team is YAGNI in cardboard armor.
Tradeoffs you'll hit
- act vs hosted runners —
actis great for 80% of workflow debugging but doesn't perfectly emulate GitHub-hosted runner features (matrix expansion edge cases, OIDC tokens, hosted-only services). Use it for iteration, then verify on real CI before merging the workflow change. - Dagger vs raw YAML — Dagger adds a language layer (Go/Python/TS) on top of CI. Worth it past ~300 YAML lines or when you need to run the same pipeline across providers. For a single-file 50-line workflow, raw YAML is still right.
- sops vs Infisical vs Vault — sops = files in git, no service. Infisical = web UI + RBAC, one service. Vault = full-blown secrets platform with dynamic credentials, multiple services. Pick the smallest that solves your problem this quarter.
- Kamal vs Kubernetes — Kamal is for teams that want zero-downtime Docker deploys without running k8s. The moment you need autoscaling, scheduled jobs, or service mesh, you're outside its target. Don't fight that boundary.
- Concourse vs GitHub Actions — If you can use hosted CI, do. Concourse is for when compliance, air-gap, or cost forces self-hosted. Operating a Concourse cluster has real ops overhead.
Common pitfalls
- No cache key strategy —
actions/cachewith the wrong key invalidates every run. Hash the lockfile (package-lock.json,poetry.lock), not the source tree. - Matrix builds with
fail-fast: true— by default GitHub kills the whole matrix on first failure. Setfail-fast: falsewhen you want to see all OS / version failures at once for triage. - Secrets in env at the workflow level — anything in
env:at the job level is visible to every step, including third-party actions. Inject secrets only into the specific step that needs them. - Forgetting
concurrency:— without a concurrency group, two pushes to the same branch run two deploys in parallel and race. Addconcurrency: { group: deploy-${{ github.ref }}, cancel-in-progress: true }. - Gitleaks with no allowlist — first run will flag test fixtures and example tokens. Curate the
.gitleaks.tomlallowlist once, then it stays useful instead of being muted. - Kamal without a healthcheck endpoint — Kamal's zero-downtime relies on
/upreturning 200 before traffic switches. Skip that and you get downtime-ish deploys instead.
10 recursos listos para instalar
Preguntas frecuentes
Do I really need all ten? It looks like a lot for one repo.
No. The minimum viable pipeline is actionlint + Super-Linter + BuildKit + Gitleaks + one of (sops or Infisical) + Kamal. Add act when you start debugging workflows often, Dagger when YAML hurts, Concourse only if hosted CI is off the table. Treat the list as a ramp, not a shopping cart.
Can I use this pack with GitLab CI or Buildkite instead of GitHub Actions?
Yes — that's exactly why Dagger and Concourse are in the list. actionlint / act are GitHub-specific, but BuildKit, Super-Linter (via Docker), Gitleaks, sops, Infisical, and Kamal are CI-agnostic. The Dagger pipeline you write runs identically on all three providers, so the lock-in shrinks to two thin entry-point YAML files.
How much CI time does the BuildKit cache actually save?
On a typical Node + Python service: cold build ~7-9 minutes, warm build (changed source only, cache hit on dependencies) ~60-120 seconds. The win compounds when you also use cache-mount on package manager caches (--mount=type=cache,target=/root/.npm) instead of just COPY-then-install. Diminishing returns past that — focus optimization elsewhere.
Why sops AND Infisical — aren't they the same thing?
Different stages of growth. sops encrypts files committed to git — no service to run, perfect for solo or small teams. Infisical runs a service with a UI, RBAC, audit log, and CI integrations — needed once non-engineers (PMs, marketers) need to rotate API keys without git access. Start with sops; migrate when the friction shows up.
How do I make AI agents (Claude, Copilot, Cursor) actually useful for CI configs?
Three habits help. First, keep one canonical workflow file per repo and a comment header explaining the pipeline's stages — the agent reads that and writes the right step. Second, give it the actionlint output when something fails (actionlint -format '{{json .}}') so it can fix root cause, not symptom. Third, when migrating between providers, point it at your Dagger pipeline file rather than YAML — it's regular code, so the agent generates correct provider entry-points easily.
12 packs · 80+ recursos seleccionados
Explora todos los packs curados en la página principal
Volver a todos los packs