Type-safe, validated CI/CD pipeline configuration for GitLab CI and GitHub Actions using Pkl.
typed-ci provides Pkl templates that allow you to write your CI/CD configurations in Pkl and then compile them (using the Pkl CLI) to YAML. Pkl will type-check, validate the configuration before it successfully compiles. This way you can configuration errors at evaluation time, not at runtime.
Write your GitLab CI pipelines in Pkl with full type safety and validation. Compile to YAML and catch errors before they break your pipeline.
amends "package://pkl-lang.org/[email protected]/GitLabCI.pkl"
stages { "build", "test", "deploy" }
jobs {
["build-job"] {
stage = "build"
script { "make build" }
}
}Write your GitHub Actions workflows in Pkl with full type safety and validation. Compile to YAML and catch errors before they break your workflow.
amends "package://pkl-lang.org/[email protected]/GitHubActions.pkl"
name = "CI"
on { push { branches { "main" } } }
jobs {
["build"] {
`runs-on` = "ubuntu-latest"
steps {
new { uses = "actions/checkout@v4" }
new { run = "make build" }
}
}
}- Pkl CLI installed
Choose the package for your platform and add it to your PklProject:
amends "pkl:Project"
dependencies {
["typed-gitlab-ci"] {
uri = "package://pkl-lang.org/[email protected]"
}
// or
["typed-github-actions"] {
uri = "package://pkl-lang.org/[email protected]"
}
}Then resolve dependencies:
pkl project resolveFor more information, check out the template-specific READMEs.
MIT