CI images
Use this skill when
- Pre-flighting the same checks CI runs (generation, formatting, static analysis, tests) before pushing.
- Preparing a release or validating Docker image tags and publishing workflow.
- Investigating why CI rejects a change that appeared to work locally.
Do not use this skill when
- The task is diagnosing an already-failing Actions run (use
github-actions-failure-triage).
- The change is pure application code with no build or release impact.
Inputs to gather
- The repository's local CI equivalents (
make targets, scripts, or documented commands).
- Whether the release is triggered by tag, release publish, or manual dispatch.
- The current image tagging convention (floating aliases,
latest pointer, semver pins).
First move
- Run the local equivalents of each CI check in order and fix each one before moving on.
Outputs
- Local CI parity results for generation, formatting, static analysis, and tests, with the failing stage identified or green status confirmed.
- Release-readiness status showing generated artifacts are current and the working tree only contains intended changes.
- Confirmed image publishing trigger and tag set (
vX.Y.Z, X.Y, X, latest) for the release path under review.
CI checks → local equivalents
CI fails fast on these in order. Run them locally before pushing:
| CI check |
Local command |
| Generated code up-to-date |
make generate (or your code-gen command) |
| Formatting |
make fmt (or gofmt -l .) |
| Static analysis |
make vet (or go vet ./...) |
| Tests |
make test |
If any fail locally, they will fail in CI. Fix before pushing.
Docker image publishing
Typical trigger: GitHub Release publish, or workflow_dispatch for manual runs.
Standard tagging strategy on release:
vX.Y.Z — exact semver
X.Y, X — floating semver aliases
latest — points to newest release
Pre-release checklist
- All tests pass:
make test
- Generated code committed: run
make generate, confirm git diff is clean
- Schema/spec validation passes (if applicable):
make validate-openapi or equivalent
Workflow
- Identify the CI stages that must stay green locally (generate, format, lint/static, test, image build).
- Run local equivalents in CI order; fix the first failure before continuing.
- Confirm generated artifacts are current and committed when generation is part of the pipeline.
- For image work, confirm Dockerfile/build context matches the publishing workflow.
- Check release readiness (clean tree, intended tags
vX.Y.Z / X.Y / X / latest).
- Run any repo release-readiness script (for example
scripts/release-readiness.sh when present).
- Only after local parity and a clean tree, trigger or document the image publish path.
- Treat remote CI as authoritative; local green is necessary but not sufficient alone.
Guardrails
- Never publish an image from a dirty working tree.
- Never publish with stale generated code — generation output must be committed.
- CI is the authoritative gate; local checks mirror it but do not replace it.
Validation
- Run the repository's documented local CI equivalents before claiming release readiness.
- Confirm generated output is current and
git diff only contains intended changes.
- For image publishing, verify the release trigger and tag set without publishing from a dirty tree.
Reference files
- Read
references/examples.md when you need concrete user utterances, expected behaviour, or a model answer shape to mirror.
- Read
references/edge-cases.md when the request is a near miss, partially matches this skill, or the first attempt fails.
scripts/release-readiness.sh — run with --help for a parameterised release-readiness check.
1---2name: ci-images3description: "Validate CI checks locally and manage Docker image publishing workflows. Use when changing build inputs (generated code, formatting, tests), preparing a release, or verifying that image tags are correct."4license: GNU GPL v35metadata:6 source: https://skillmd.com/skills/matt-riley/ci-images7 version: 1.3.2 # x-release-please-version8 owner: mattriley9 category: ci10 audience: general-coding-agent11 maturity: stable12 kind: task13---1415# CI images1617## Use this skill when1819- Pre-flighting the same checks CI runs (generation, formatting, static analysis, tests) before pushing.20- Preparing a release or validating Docker image tags and publishing workflow.21- Investigating why CI rejects a change that appeared to work locally.2223## Do not use this skill when2425- The task is diagnosing an already-failing Actions run (use `github-actions-failure-triage`).26- The change is pure application code with no build or release impact.2728## Inputs to gather2930- The repository's local CI equivalents (`make` targets, scripts, or documented commands).31- Whether the release is triggered by tag, release publish, or manual dispatch.32- The current image tagging convention (floating aliases, `latest` pointer, semver pins).3334## First move3536- Run the local equivalents of each CI check in order and fix each one before moving on.3738## Outputs3940- Local CI parity results for generation, formatting, static analysis, and tests, with the failing stage identified or green status confirmed.41- Release-readiness status showing generated artifacts are current and the working tree only contains intended changes.42- Confirmed image publishing trigger and tag set (`vX.Y.Z`, `X.Y`, `X`, `latest`) for the release path under review.4344## CI checks → local equivalents4546CI fails fast on these in order. Run them locally before pushing:4748| CI check | Local command |49| ------------------------- | ------------------------------------------ |50| Generated code up-to-date | `make generate` (or your code-gen command) |51| Formatting | `make fmt` (or `gofmt -l .`) |52| Static analysis | `make vet` (or `go vet ./...`) |53| Tests | `make test` |5455If any fail locally, they will fail in CI. Fix before pushing.5657## Docker image publishing5859Typical trigger: GitHub Release publish, or `workflow_dispatch` for manual runs.6061Standard tagging strategy on release:6263- `vX.Y.Z` — exact semver64- `X.Y`, `X` — floating semver aliases65- `latest` — points to newest release6667## Pre-release checklist68691. All tests pass: `make test`702. Generated code committed: run `make generate`, confirm `git diff` is clean713. Schema/spec validation passes (if applicable): `make validate-openapi` or equivalent7273## Workflow74751. Identify the CI stages that must stay green locally (generate, format, lint/static, test, image build).762. Run local equivalents in CI order; fix the first failure before continuing.773. Confirm generated artifacts are current and committed when generation is part of the pipeline.784. For image work, confirm Dockerfile/build context matches the publishing workflow.795. Check release readiness (clean tree, intended tags `vX.Y.Z` / `X.Y` / `X` / `latest`).806. Run any repo release-readiness script (for example `scripts/release-readiness.sh` when present).817. Only after local parity and a clean tree, trigger or document the image publish path.828. Treat remote CI as authoritative; local green is necessary but not sufficient alone.8384## Guardrails8586- Never publish an image from a dirty working tree.87- Never publish with stale generated code — generation output must be committed.88- CI is the authoritative gate; local checks mirror it but do not replace it.8990## Validation9192- Run the repository's documented local CI equivalents before claiming release readiness.93- Confirm generated output is current and `git diff` only contains intended changes.94- For image publishing, verify the release trigger and tag set without publishing from a dirty tree.9596## Reference files9798- Read `references/examples.md` when you need concrete user utterances, expected behaviour, or a model answer shape to mirror.99- Read `references/edge-cases.md` when the request is a near miss, partially matches this skill, or the first attempt fails.100- [`scripts/release-readiness.sh`](scripts/release-readiness.sh) — run with `--help` for a parameterised release-readiness check.