How to Cache Dependencies in GitHub Actions

A workflow that runs npm ci on every push downloads the same few hundred packages from the registry each time, even when the lockfile hasn鈥檛 changed in a week. On a project with a real dependency tree that鈥檚 a minute or two gone before the first test starts, and you pay it again on every push and every pull request. actions/cache keeps those downloads between runs and hands them back when nothing relevant has changed. ...

September 23, 2026 路 6 min 路 1167 words 路 SpaghettiCoder

Build and Push a Docker Image with GitHub Actions

docker build && docker push from your laptop works until someone else has to ship the same image, or it has to happen on every merge without you at the keyboard. GitHub Actions runs that build on GitHub鈥檚 runners, tags the image from whatever triggered the workflow, and pushes it to a registry your deploy step can pull from. Nothing runs locally. What it takes to build and push a Docker image from CI Five pieces have to be in place before a runner can push an image: ...

September 11, 2026 路 7 min 路 1484 words 路 SpaghettiCoder