feat(reusable): resolve the reviewer image tag at runtime (GADFLY_REVIEWER_TAG)
Nearly every consumer re-pin of review-reusable.yml was a reviewer IMAGE bump, not a structural change — but the tag was baked into a `uses: docker://` step, which is parsed before any expression context exists and so can't read a variable. Run the reviewer as the JOB container instead (container.image DOES accept expressions) with an explicit `run: /entrypoint.sh` step: the tag now resolves per-run via inputs.reviewer_tag → user var GADFLY_REVIEWER_TAG → the baked fallback pin (sha-b37cd09, unchanged). A Gadfly release becomes: build the image, update the ONE user-level variable — every consumer pinned to this file's @<sha> picks it up on its next review with no re-pin. Workflow re-pins remain only for structural yml changes (this is one — intended to be the last routine one). - Entrypoint contract unchanged: same env block, same /entrypoint.sh brains (bash + entrypoint already live in the image; ENTRYPOINT was /entrypoint.sh). - Keep the variable on immutable sha- tags, never :latest (act_runner caches :latest and often does not re-pull a moved one). - Tradeoff noted in comments: vars are unmasked and move without a commit trail — same blast radius as editing this file, minus the audit trail. - README (image/pinning para + Central config table) and examples/reusable.yml updated per the maintenance rule. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -401,6 +401,12 @@ pinned version (plus `:latest`). Pin full-stub consumers to a `:vN` image tag fo
|
||||
(`@v1`) or `@main` is often **not** re-fetched and silently runs a stale copy. A fresh `@<sha>` is the
|
||||
only reliable way to roll out a *structural* change to the reusable.
|
||||
|
||||
Structural changes are the rare case, though: the reviewer **image tag** the reusable runs resolves at
|
||||
runtime (`reviewer_tag` input → user var `GADFLY_REVIEWER_TAG` → the fallback pin baked into the
|
||||
reusable), so a routine Gadfly release is *build the image → update `GADFLY_REVIEWER_TAG` to the new
|
||||
`sha-<short>`* — every pinned consumer picks it up on its next review, no re-pin. Always point the
|
||||
variable at an immutable `sha-` tag, never `:latest` (the runner caches `:latest`).
|
||||
|
||||
### Central config via variables
|
||||
|
||||
So you don't have to re-pin every consumer just to retune the swarm, the reusable resolves its config
|
||||
@@ -410,6 +416,7 @@ on its next review **without** a re-pin or a tag move:
|
||||
|
||||
| Variable (user/org scope) | Sets |
|
||||
|---|---|
|
||||
| `GADFLY_REVIEWER_TAG` | the reviewer **image tag** the reusable runs (e.g. `sha-b37cd09`); empty ⇒ the fallback pin baked into the reusable |
|
||||
| `GADFLY_DEFAULT_MODELS` | `GADFLY_MODELS` (csv) |
|
||||
| `GADFLY_DEFAULT_SPECIALISTS` | the lens suite |
|
||||
| `GADFLY_DEFAULT_PROVIDER_LENS_CONCURRENCY` | the per-provider lens budget (lens passes in flight per provider, shared across its models) |
|
||||
|
||||
Reference in New Issue
Block a user