chore: CI that checks every change and publishes the image to GHCR - #5
Merged
Merged
Conversation
- run-tests.yml becomes ci.yml, shaped like the web client's, ready for an image job. - The check job runs every gate: lint, format, types, dead code, tests.
- Built only after every check passes; never on a pull request. - Tagged with the ref, the commit and latest; labelled to link it to this repo. - Pushed with the workflow's own token, so no secret needs setting up.
- workflow_dispatch runs check and publishes the chosen ref's image. - Only main tags latest, so a manual branch run cannot replace what deploys pull.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One workflow,
.github/workflows/ci.yml, in the same shape as the web client's, with no security scan:checkruns on every pull request, on pushes tomain, and on release tags. It runsuv sync --locked, then ruff, ruff format, pyright, vulture and pytest.imageruns only aftercheckpasses, and never on a pull request. It builds the Dockerfile and pushes it toghcr.io/openagrinet/experience-api, tagged with the ref (mainorv1.2.0), the commit SHA, andlatest.org.opencontainers.image.source, so the package links to this repository.GITHUB_TOKENwithpackages: write, so there's no secret to set up.This replaces
run-tests.yml. The README says where to pull the image from.Why
Every change is checked, and every change that reaches
mainbecomes a deployable image.Testing
checkitself.imageruns first when this merges tomain.🤖 Generated with Claude Code