Zero-Touch Factorio Updates: GitOps + OKD Magic
How I turned bi-weekly manual Factorio server updates into a fully automated, set-it-and-forget-it GitOps pipeline using GitHub Actions, nightly version checks, and OKD's native ImageStream + Deployment triggers. No more pod killing.
Zero-Touch Factorio Updates: GitOps + OKD Magic

As a cloud maintainer for Tampa Devs, I'm always looking for ways to make our OKD Kubernetes cluster more fun and useful. One of our community gems is the Factorio server running that hosts a game for local players but also avaialble to anyone online .
For those who may not know, Factorio is addictive game where you building factories, optimizing belts, automating everything — but keeping the server on the latest version was a recurring pain. New releases were dropping every couple of weeks, and the old process involved manual Docker builds, pushes to GHCR, and pod deletes to force pulls.
Once the process was automated, Factorio took a pause for a few weeks before they pushed a new update until this month which the process finally got to see action. The result: zero-touch updates. GitHub Actions check Factorio's API nightly, bump the version file if needed, trigger a build to :latest, and OKD's ImageStream + Deployment triggers handle the rest. No SSH, no oc delete pod, no interruptions.
Everything lives in our public repo here:
https://github.com/TampaDevs/cloud-development-gitops-apps/tree/main/game-servers/factorio
Let's walk through how it evolved and how you can replicate it.
The Old Manual Way (Painful)
- Check Factorio release notes or get told that the server isn't updated and no one can connect
- Build new Docker image with updated version
docker push ghcr.io/tampadevs/factorio:latestoc delete pod -n ontampa-devs-gaming -l app.kubernetes.io/name=factorio
It worked, but it was repetitive and error prone and I personally built the image locally and uploaded on Spectrum which was slow.
Phase 1 – Trigger Builds from a Version File
I introduced a single source-of-truth file: factorio-version.txt
A GitHub Action watches for changes to this file and builds/pushes the image. The sections below rely on a few key points. First is the 'on' section which tells Github when to run our action. In this case a change to the main (or 'dev' branch for testing) and then if we are editing one of our key Docker related files. We do our authentication and login with our secrets and then we usefactorio-version.txtfile as our variable to use for the version to download and run our Docker build. Once complete, we push the new image to GHCR.
Now I can bump the version from my phone, commit, and the image is ready in minutes.
Still manual: someone needs to restart the pod
Phase 2 – Nightly Version Detection
Factorio publishes latest releases at https://factorio.com/api/latest-releases.
I added a simple Node.js script in version-updater/check-and-update.js that:
- Fetches the API
- Compares against factorio-version.txt
- If newer → overwrites the file and commits/pushes
Scheduled GitHub Action runs every night:
Chain reaction achieved: nightly check → version bump → build trigger → new image in GHCR.
Phase 3 – Hands-Off Deploys with OKD ImageStream + Triggers
This is where OKD shines.
We use an ImageStream that points to our remote GHCR image and has importPolicy.scheduled: true:
Every ~15 minutes (cluster-wide default in OKD 4.x), the image controller checks GHCR. If :latest now points to a new digest, it imports the update → the ImageStreamTag refreshes.
The Deployment watches this via the special annotation:
When the ImageStream updates, OKD automatically patches the Deployment's pod template with the new digest → triggers a rollout (Recreate strategy in our case). Game server restarts cleanly with the latest version, persistent volume intact.
Why This Wins
* Pure GitOps: Everything declarative in the repo.
* Zero toil: No manual steps after initial setup.
* Reliable timing: Nightly checks + 15-min import window = always reasonably current.
* Community extensible: Fork it for Minecraft, Valheim, or any container that needs latest-image behavior.
Want to run your own? Jump into the repo, deploy via Helm, or PR your improvements.
Let's keep automating the fun stuff.
Questions, ideas, or want help onboarding to the OKD cluster? Hit me up in TampaDevs Discord.
Happy building (and mining) 🚀
Enjoyed this post?
Get more build logs and random thoughts delivered to your inbox. No spam, just builds.