Skip to content
Latchkey
CI How-To by Platform

How to do the same CI task on GitHub Actions, GitLab, CircleCI, Jenkins, and more.

Step-by-step how-tos for common CI/CD tasks - caching, secrets, matrix builds, artifacts, services, manual and scheduled triggers - shown for GitHub Actions, GitLab CI, CircleCI, Jenkins, Azure Pipelines, and Bitbucket.

GitHub Actions

Task how-tos for GitHub Actions.

Build provenance attestationEmit signed SLSA build provenance for an artifact in GitHub Actions with actions/attest-build-provenance, rec… Rust multi-target buildCross-build a Rust binary for several platform targets in GitHub Actions with a matrix, using cross or rustup… Cache dev containerBuild a dev container in GitHub Actions with the devcontainers CLI and cache its layers so repeated CI runs r… Close stale issuesMark and close inactive issues and pull requests on a schedule in GitHub Actions with the stale action, warni… Comment on a PRPost a comment on a pull request from a GitHub Actions workflow using actions/github-script and the GITHUB_TO… Branch vs line coverageTurn on branch coverage in CI so both sides of every conditional are measured, a stricter signal than line co… Encrypt artifactsEncrypt sensitive build outputs with GPG or openssl in GitHub Actions before calling upload-artifact so the s… Prow-style /lgtm /approveImplement Prow-style commands such as /lgtm and /approve in GitHub Actions, mapping each to a label and a req… Bypass required reviewsAllow a workflow to merge past required pull request reviews by adding a GitHub App to the branch protection… Multi-arch image to ECRBuild and push a multi-arch (amd64 + arm64) Docker image to Amazon ECR in GitHub Actions using OIDC to authen… Keyless push to GHCRPush container images to GitHub Container Registry from Actions using the built-in GITHUB_TOKEN and packages:… Restrict workflow_dispatchLimit who can manually run a GitHub Actions workflow_dispatch by checking the actor permission level with the… Reuse a workflowBuild a reusable GitHub Actions workflow with on.workflow_call, declaring inputs and secrets, then call it fr… Run fork PRs safelyRun GitHub Actions on fork pull requests without leaking secrets by splitting untrusted build from a privileg… Comment commandsBuild a slash-command bot in GitHub Actions that triggers on issue_comment, parses a command like /deploy, an… kubeconform manifestsValidate Kubernetes manifests against the API schemas in GitHub Actions with kubeconform so invalid YAML is r… rustfmt + clippyCheck Rust formatting and lints in GitHub Actions with rustfmt and clippy so unformatted code or clippy warni… Set a commit statusSet a custom commit status from GitHub Actions with the GITHUB_TOKEN and the statuses API, so an external che… Matrix from job outputBuild a dynamic GitHub Actions matrix from a previous jobs output by emitting a JSON array to GITHUB_OUTPUT a… Webhook triggerFire a GitHub Actions workflow from any external system by POSTing a repository_dispatch event to the GitHub… Trigger on push to branchesRun a GitHub Actions workflow only when commits are pushed to named branches using on.push.branches, so featu… Use set -euo pipefailMake GitHub Actions bash scripts fail loudly by starting them with set -euo pipefail, so unset variables and… Verify /version matches SHAConfirm the running release is the exact commit you deployed in GitHub Actions by comparing a /version endpoi…

GitLab CI

Task how-tos for GitLab CI.

CircleCI

Task how-tos for CircleCI.

Jenkins

Task how-tos for Jenkins.

Azure Pipelines

Task how-tos for Azure Pipelines.

Bitbucket

Task how-tos for Bitbucket Pipelines.

Explore other topics