flux-ghcr-image-automation
Skill2 starsChanged 3 months agoMITView on GitHub
Build, review, debug, or fix GitHub Actions to GHCR to FluxCD image automation loops. Use whenever the user mentions Flux image automation, ImageRepository, ImagePolicy, ImageUpdateAutomation, GHCR, Docker metadata tags, Kubernetes pods not rolling after an image push, mutable latest tags, digest updates, or GitHub Actions publishing container images for Flux-managed Kubernetes workloads.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- act-within-scopeSkill
- asd-ste100Skill
- codingSkill
- context-managementSkill
- create-verification-skillSkill
- dockerfileSkill
- domain-modelingSkill
- encode-lessonsSkill
- experience-firstSkill
- eyes-onSkill
- flux-kustomize-layoutSkill
- frontend-designSkill
- git-commit-workflowSkill
- git-worktreeSkill
- grill-with-docsSkill
- implement-ticketsSkill
- maintain-verification-skillSkill
- makefileSkill
- omarchy-developmentSkill
- releaseSkill
- skill-evaluationSkill
- technical-writingSkill
- test-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Create a reliable GitOps image release loop:
- Very specific: line 25
Prefer traceable, orderable image tags over mutable-only latest deployments.
- Distinctive: line 41
If a live cluster is available and the user is debugging a rollout, inspect live state before changing files:
- Very specific: line 54
Do not rely on plain sha-* tags for "latest commit" selection.
- Distinctive: line 56
Prefer branch, short SHA, and timestamp tags for branch builds:
- Very specific: line 64
Keep Flux image update commits from triggering fresh image builds by ignoring the manifest paths that Flux mutates, commonly kustomization/.
- Distinctive: line 66
Keep the inline Flux setter comment on every image field Flux should update.
- Very specific: line 69
When a Flux Kustomization has targetNamespace, remember that namespaced resources without an explicit namespace may land in that target …
- Very specific: line 73
Keep ImageUpdateAutomation.update.path pointed at the directory that contains the file with the image setter comment.
- Distinctive: line 91
Ensure the GitHub Actions workflow publishes an orderable, commit-traceable tag for that branch.
- Very specific: line 93
Ensure ImageRepository scans the correct GHCR image.
- Very specific: line 94
Ensure ImagePolicy selects the intended branch builds.
- Distinctive: line 95
Ensure the workload image field has a correct Flux setter comment.
- Very specific: line 96
Ensure ImageUpdateAutomation can read and push to the correct GitRepository.
- Distinctive: line 99
If a cluster is available, use server-side dry-run and live Flux status.
- Distinctive: line 103
Run the strongest practical checks:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flux GHCR Image Automation
Goal
Create a reliable GitOps image release loop:
- GitHub Actions builds and pushes a container image to GHCR.
- Flux image-reflector-controller discovers the new tag or digest.
- Flux image-automation-controller commits the selected image reference back to Git.
- Flux kustomize-controller applies that commit and rolls the Kubernetes workload.
Prefer traceable, orderable image tags over mutable-only latest deployments.
The operator should be able to answer "which Git commit produced this running
pod?" from the image tag.
When Starting
Inspect the repo and cluster shape before editing:
.github/workflows/*.ymlDockerfilekustomization/**- any
ImageRepository,ImagePolicy,ImageUpdateAutomation,Deployment, and FluxKustomizationresources - the current branch name and default branch
- whether the Flux app
KustomizationusestargetNamespace
If a live cluster is available and the user is debugging a rollout, inspect live state before changing files:
flux get images all -n <image-resource-namespace>
kubectl get kustomization -A -o wide
kubectl describe imageupdateautomation <name> -n <namespace>
kubectl get deploy <name> -n <namespace> -o yaml
kubectl get gitrepository -A -o wideDesign Rules
- Do not rely on plain
sha-*tags for "latest commit" selection. SHA strings identify commits but do not sort by time. - Prefer branch, short SHA, and timestamp tags for branch builds:
<branch>-<short-git-sha>-<unix-timestamp>- Configure Flux
ImagePolicyto filter the branch tag pattern, extract the timestamp, and use numerical ordering. - Keep Flux image update commits from triggering fresh image builds by ignoring
the manifest paths that Flux mutates, commonly
kustomization/**. - Keep the inline Flux setter comment on every image field Flux should update.
- Make the image setter comment reference the namespace where the
ImagePolicyactually exists after Flux applies the manifests. - When a Flux
KustomizationhastargetNamespace, remember that namespaced resources without an explicit namespace may land in that target namespace. - Set
ImageUpdateAutomation.spec.sourceRef.namespacewhen the referencedGitRepositoryis in a different namespace. - Keep
ImageUpdateAutomation.update.pathpointed at the directory that contains the file with the image setter comment.
References
Load only the reference needed for the task:
- tagging-policy.md for GitHub Actions Docker metadata tags and orderable Flux policies.
- flux-manifests.md for ImageRepository, ImagePolicy, ImageUpdateAutomation, setter comments, and namespace rules.
- diagnostics.md for live cluster debugging and rollout verification.
Implementation Workflow
- Identify the workload image and the registry repository.
- Confirm which Git branch should drive deployments.
- Ensure the GitHub Actions workflow publishes an orderable, commit-traceable tag for that branch.
- Ensure
ImageRepositoryscans the correct GHCR image. - Ensure
ImagePolicyselects the intended branch builds. - Ensure the workload image field has a correct Flux setter comment.
- Ensure
ImageUpdateAutomationcan read and push to the correctGitRepository. - Validate the rendered manifests.
- If a cluster is available, use server-side dry-run and live Flux status.
Validation
Run the strongest practical checks:
kubectl kustomize <overlay>
kubectl apply --dry-run=server -k <overlay>
git diff --checkFor live rollout debugging, confirm each stage:
flux get images all -n <image-resource-namespace>
kubectl describe imageupdateautomation <name> -n <namespace>
kubectl get gitrepository <name> -n <namespace> -o wide
kubectl get kustomization <name> -n <namespace> -o wide
kubectl get deploy <name> -n <namespace> -o jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'
kubectl get pods -n <namespace> -l <selector> -o wideReport exactly where the loop is stopped: image build, registry scan, image policy selection, Git update commit, Kustomization apply, or Deployment rollout.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

