flux-ghcr-image-automation

Build and debug GitHub Actions to GHCR to FluxCD image automation loops.

2|Updated May 14, 2026
One-click install
npx skills add https://github.com/AnthonyPoschen/agent-skills --skill flux-ghcr-image-automation-anthonyposchen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flux-ghcr-image-automation
Source: https://github.com/AnthonyPoschen/agent-skills/tree/main/skills/flux-ghcr-image-automation
Command: npx skills add https://github.com/AnthonyPoschen/agent-skills --skill flux-ghcr-image-automation-anthonyposchen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Kubernetes workloads managed by FluxCD often fail to roll out new container images because the GitOps image automation loop breaks somewhere between GitHub Actions, GHCR, and the Flux controllers. This Skill diagnoses and fixes each stage of that loop so pods actually roll when new images are pushed. ## Core Features & Use Cases - Orderable Image Tagging: Configures GitHub Actions to publish commit-traceable tags in the format branch-shortsha-timestamp, and sets up Flux ImagePolicy with numerical ordering instead of unsortable sha-* tags. - Flux Manifest Configuration: Creates and reviews ImageRepository, ImagePolicy, ImageUpdateAutomation resources, and the $imagepolicy setter comments on Deployment image fields, including namespace and targetNamespace gotchas. - Staged Rollout Diagnostics: Walks the loop in order (build, registry scan, policy selection, Git update commit, Kustomization apply, Deployment rollout) to pinpoint exactly where it stopped. - Use Case: A team pushes a new image to GHCR but the pod never updates. Use this Skill to discover the ImageUpdateAutomation references a GitRepository in the wrong namespace, fix sourceRef.namespace, and verify the rollout end to end. ## Quick Start Ask the agent to set up Flux image automation for my app so GitHub Actions builds to GHCR automatically update my Kubernetes deployment.

Frequently Asked Questions about flux-ghcr-image-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up FluxCD image automation with GitHub Actions and GHCR?▼

Configure GitHub Actions to push an orderable tag like branch-shortsha-timestamp to GHCR, then create an ImageRepository to scan GHCR, an ImagePolicy with a filterTags pattern extracting the timestamp for numerical ordering, and an ImageUpdateAutomation that commits the selected image back to Git.

Why are my Kubernetes pods not updating after pushing a new image to GHCR?▼

Debug the loop in order: check the GitHub Actions build, then flux get images for the registry scan, the ImagePolicy status for selection, the ImageUpdateAutomation for the Git commit, the Kustomization apply, and finally the Deployment image. The Skill identifies exactly which stage stopped.

Why should I not use sha-* tags for Flux image policy selection?▼

SHA tags like sha-5838cfa are identifiers whose alphabetical or numerical ordering does not map to commit time or deploy freshness. Use branch-shortsha-timestamp tags so Flux can select the newest build with numerical ordering while keeping the tag commit-traceable.

How do Flux image setter comments work with namespaces?▼

Flux only updates image fields carrying a comment like # {"$imagepolicy": "namespace:name"}. The namespace must match where the ImagePolicy exists after Flux applies manifests, which can change if the parent Flux Kustomization sets targetNamespace.

How do I stop Flux image update commits from triggering new builds?▼

Add paths-ignore for the manifest directories Flux mutates, commonly kustomization/**, to the GitHub Actions push trigger. Without this, a Flux image update commit triggers a new build, which triggers another Flux update in a loop.

When should I use digestReflectionPolicy Always versus IfNotPresent?▼

Use IfNotPresent for immutable timestamped tags where the digest never changes for a given tag. Use Always only when intentionally tracking a mutable tag such as latest, since the digest behind that tag changes with each push.