Workflow Templates
Copy-paste GitHub Actions workflows for every stack.
Ready-to-use .github/workflows YAML for Node, Python, Go, Rust, Docker, monorepos, and mobile - with caching and best practices baked in. Copy, commit, and run faster on Latchkey.
By language
Node, Python, Go, Rust, Java, Ruby, .NET.
Build an Android App workflowA GitHub Actions workflow that builds an Android app with Gradle, caches dependencies, and uploads the APK as…
Cache Cargo Builds workflowA GitHub Actions workflow for Rust that caches the Cargo registry, git index, and target directory to speed u…
Cache Gradle Builds workflowA GitHub Actions workflow for a Gradle project that caches the Gradle dependency and build cache so builds ru…
Comment Coverage on PRs workflowA GitHub Actions workflow that runs tests with coverage and posts a coverage summary as a sticky comment on t…
Concurrency Cancellation workflowA GitHub Actions workflow that cancels superseded runs on the same branch or PR, so only the latest commit ke…
Cron Build That Opens an Issue on Failure workflowA GitHub Actions workflow that runs on a cron schedule and automatically opens a GitHub issue whenever the sc…
Database Migration Tests with Postgres workflowA GitHub Actions workflow that spins up a Postgres service container, applies migrations, and runs tests agai…
Lint and Type-Check in Parallel workflowA GitHub Actions workflow that runs linting and type-checking as separate parallel jobs so the slowest one bo…
Matrix Across Node Versions workflowA GitHub Actions workflow that tests your project across multiple Node.js versions in parallel using a build…
Matrix Across Operating Systems workflowA GitHub Actions workflow that runs the same test suite on Linux, macOS, and Windows runners in parallel usin…
Playwright End-to-End Tests workflowA GitHub Actions workflow that runs Playwright end-to-end browser tests and uploads the HTML report and trace…
Reusable Workflow workflowA GitHub Actions reusable workflow that other workflows call with inputs and secrets, centralizing your CI lo…
Run on a Managed Self-Hosted Runner workflowA GitHub Actions workflow that targets a managed self-hosted runner label for cheaper, self-healing CI on the…
Scheduled Nightly Build workflowA GitHub Actions workflow that runs a full build and test suite on a nightly cron schedule, independent of an…
Go workflowA ready-to-use GitHub Actions workflow for Go with caching and best practices - copy, commit, and run faster…
Java (Maven) workflowA ready-to-use GitHub Actions workflow for Java (Maven) with caching and best practices - copy, commit, and r…
Node.js workflowA ready-to-use GitHub Actions workflow for Node.js with caching and best practices - copy, commit, and run fa…
Python workflowA ready-to-use GitHub Actions workflow for Python with caching and best practices - copy, commit, and run fas…
Rust workflowA ready-to-use GitHub Actions workflow for Rust with caching and best practices - copy, commit, and run faste…
Docker & deploy
Build/push images, deploy to cloud.
Blue-Green Deploy workflowA GitHub Actions workflow that performs a blue-green deploy -- releasing to the idle color, health-checking i…
Build a Multi-Arch Image workflowA GitHub Actions workflow that builds and pushes a multi-architecture Docker image (amd64 and arm64) using Bu…
Build a Python Package and Publish to PyPI workflowA GitHub Actions workflow that builds a Python package and publishes it to PyPI using trusted publishing (OID…
Build a Static Site and Deploy to Pages workflowA GitHub Actions workflow that builds a static site and deploys it to GitHub Pages using the official Pages d…
Build and Push to GHCR workflowA GitHub Actions workflow that builds a Docker image and pushes it to GitHub Container Registry with layer ca…
Canary Deploy workflowA GitHub Actions workflow that performs a canary deploy -- shifting a small traffic slice first, then promoti…
Deploy to AWS via OIDC workflowA GitHub Actions workflow that deploys to AWS by assuming an IAM role through OIDC, with no long-lived access…
Deploy to GCP via WIF workflowA GitHub Actions workflow that deploys to Google Cloud using Workload Identity Federation, so no service-acco…
Manual Approval Before Deploy workflowA GitHub Actions workflow that requires a manual reviewer approval through a protected environment before it…
Promote an Image Across Environments workflowA GitHub Actions workflow that promotes the exact same Docker image digest from staging to production without…
Publish to npm on Tag workflowA GitHub Actions workflow that builds, tests, and publishes an npm package automatically whenever you push a…
Security Scanning with CodeQL and Trivy workflowA GitHub Actions workflow that runs CodeQL static analysis and Trivy filesystem scanning, uploading both as S…
Semantic Release on Push workflowA GitHub Actions workflow that runs semantic-release on every push to main, deciding the version bump from co…
Terraform Plan on PR, Apply on Merge workflowA GitHub Actions workflow that runs terraform plan on pull requests and terraform apply when changes merge to…
Deploy to AWS (OIDC) workflowA ready-to-use GitHub Actions workflow for Deploy to AWS (OIDC) with caching and best practices - copy, commi…
Docker (build & push) workflowA ready-to-use GitHub Actions workflow for Docker (build & push) with caching and best practices - copy, comm…
Monorepo & matrix
Affected builds, matrix, sharding.
Monorepo Affected-Only Builds workflowA GitHub Actions workflow for a monorepo that detects changed paths and builds only the affected packages, sk…
Run Only on Changed Paths workflowA GitHub Actions workflow that triggers only when files under specific paths change, skipping CI entirely for…
Monorepo (matrix) workflowA ready-to-use GitHub Actions workflow for Monorepo (matrix) with caching and best practices - copy, commit,…
Explore other topics
GitHub ActionsWorkflow, runner, and YAML errors - diagnosed and fixed.
Node.js & npmnpm, yarn, and pnpm failures in CI - solved.
DockerBuild, run, compose, and registry errors - explained.
Pythonpip, poetry, venv, and pytest failures - fixed.
Java & JVMMaven, Gradle, and JVM failures in CI - resolved.
GoGo build, module, and test failures - diagnosed.