ci: CI-resolve mempalace-toolkit to a pinned SHA
mempalace-toolkit is the only dependency cloned in Dockerfile.base (all others live in the variant), so it bypassed the resolve-versions -> build-arg plumbing and its ref stayed a literal `main`. Because the base only rebuilds on a content hash, a toolkit-only fix would silently fail to land unless Dockerfile.base itself changed. Mirrors pi-devbox commit 4744f05, adapted to this repo: - resolve-versions: new mempalace_toolkit_ref output via the gitea commits API (first gitea call in this repo's CI; works unauthenticated, no secret). - base-decide: needs resolve-versions; fold the SHA into the base-tag hash so a moved toolkit forces a base rebuild (they no longer run in parallel). - build-base: needs resolve-versions; pass --build-arg MEMPALACE_TOOLKIT_REF. - Dockerfile.base: clone switched to SHA-capable git fetch + checkout FETCH_HEAD (git clone --branch <SHA> would fail). - docs lockstep: .gitea/README.md Step 1 (no longer "in parallel"), AGENTS.md Critical conventions, CHANGELOG Unreleased. base_tag now reflects a live gitea lookup; on API blip it falls back to `main`, triggering one extra rebuild, never a missed one. No new tag — lands on the next release or workflow_dispatch.
This commit is contained in:
+10
-1
@@ -75,7 +75,13 @@ The split-base architecture is what the `docker-publish-split.yml` workflow exer
|
||||
└──────────────────────────┘
|
||||
```
|
||||
|
||||
### Step 1: `base-decide` (and `resolve-versions` in parallel)
|
||||
### Step 1: `resolve-versions`, then `base-decide`
|
||||
|
||||
**`resolve-versions`** resolves floating refs to concrete values: `omos_version`
|
||||
(npm `latest`) and `mempalace_toolkit_ref` (the `mempalace-toolkit` `main` HEAD
|
||||
resolved to a commit SHA via the gitea commits API). **`base-decide`** now
|
||||
**depends on `resolve-versions`** (they no longer run in parallel) because it
|
||||
folds `mempalace_toolkit_ref` into the base hash — see below.
|
||||
|
||||
**`base-decide`** computes a SHA-256 hash over the inputs that determine
|
||||
the base image's content:
|
||||
@@ -90,6 +96,9 @@ the base image's content:
|
||||
! -name '._*' \
|
||||
-print0 | sort -z | xargs -0 cat
|
||||
cat entrypoint.sh entrypoint-user.sh
|
||||
echo "$mempalace_toolkit_ref" # CI-resolved SHA; mempalace-toolkit is
|
||||
# cloned in Dockerfile.base, so a moved
|
||||
# toolkit must force a base rebuild
|
||||
} | sha256sum | cut -c1-12
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user