> Dagger CI/CD

Write CI/CD pipelines as code with Dagger. Portable, testable pipelines in TypeScript/Python/Go.

fetch
$curl "https://skillshub.wtf/skillshub-team/catalog-batch5/dagger-cicd?format=md"
SKILL.mdDagger CI/CD

Dagger CI/CD

Setup

curl -L https://dl.dagger.io/dagger/install.sh | sh
npm install @dagger.io/dagger

Pipeline (TypeScript)

import { connect } from "@dagger.io/dagger";

connect(async (client) => {
    const src = client.host().directory(".", { exclude: ["node_modules", ".git"] });

    // Build
    const build = client.container()
        .from("node:20-alpine")
        .withDirectory("/app", src)
        .withWorkdir("/app")
        .withExec(["npm", "ci"])
        .withExec(["npm", "run", "build"]);

    // Test
    await build.withExec(["npm", "test"]).sync();

    // Publish
    const image = build.withEntrypoint(["node", "dist/index.js"]);
    await image.publish("ghcr.io/myorg/myapp:latest");
});

Run: dagger run node pipeline.ts

Works the same locally and in CI (GitHub Actions, GitLab, etc.)

Caching built-in, reproducible builds

┌ stats

installs/wk0
░░░░░░░░░░
first seenMar 18, 2026
└────────────

┌ tags

└────────────