diff --git a/.gitea/scripts/publish-releases.js b/.gitea/scripts/publish-releases.js index 881a2306d2..0897fcb5d0 100644 --- a/.gitea/scripts/publish-releases.js +++ b/.gitea/scripts/publish-releases.js @@ -28,6 +28,8 @@ const GITEA_TOKEN = env('GITEA_TOKEN'); const REG_TOKEN = env('REG_TOKEN'); const MAIN_SHA = env('MAIN_SHA'); const RUN_NUMBER = env('RUN_NUMBER', ''); +// The Dockerfile's default DSH_VERSION — the version the deployment is pinned to. +const PINNED = env('PINNED', ''); const DRY_RUN = process.env.DRY_RUN === '1'; const REGISTRY = new URL(GITEA).host; const UPSTREAM = 'deepseek-ai/deepseek-harness'; @@ -154,15 +156,22 @@ async function imageFacts(tag) { function renderBody({ tag, ver, facts, builtFrom, notes }) { const pull = `gitea.milesward.dev/${IMAGE}:${tag}`; - const intro = isRevision(tag) + const pinned = PINNED !== '' && ver === PINNED; + let intro = isRevision(tag) ? `Toolchain refresh of **DeepSeek Harness (dsh) ${ver}**: the same upstream release, rebuilt with the current pnpm and a freshly patched \`node:22-bookworm-slim\` base.` : `Container build of **DeepSeek Harness (dsh) ${ver}** from the official npm release, built and smoke-tested by CI.`; + if (pinned) { + intro += isRevision(tag) + ? ' This is a refresh of the **pinned deployment version**.' + : ' **This is the pinned deployment version** — the Dockerfile default and the tag the Unraid template runs. Newer versions are published as their own tags and adopted only by editing the template.'; + } const lines = [ intro, '', '```', `docker pull ${pull}`, '```', '', "### What's inside", '', '| | |', '|---|---|', + ...(pinned ? ['| role | **Pinned deployment version** |'] : []), `| dsh | \`${ver}\` — [upstream release notes](https://github.com/${UPSTREAM}/releases/tag/dsh-v${ver}) |`, `| pnpm | \`${facts.pnpm || 'unknown'}\` |`, `| base image | \`${facts.base || 'unknown'}\` |`, diff --git a/.gitea/workflows/sync-upstream.yml b/.gitea/workflows/sync-upstream.yml index e05b41b06a..487c3eb9a1 100644 --- a/.gitea/workflows/sync-upstream.yml +++ b/.gitea/workflows/sync-upstream.yml @@ -202,7 +202,8 @@ jobs: run: | set -eu MAIN_SHA=$(git rev-parse HEAD) + PINNED=$(sed -n 's/^ARG DSH_VERSION=//p' Dockerfile | head -1) docker run --rm -i \ -e "GITEA=https://${REGISTRY}" -e OWNER -e REPO -e IMAGE -e GITEA_TOKEN -e REG_TOKEN \ - -e "MAIN_SHA=${MAIN_SHA}" -e RUN_NUMBER \ + -e "MAIN_SHA=${MAIN_SHA}" -e RUN_NUMBER -e "PINNED=${PINNED}" \ "$BASE_IMAGE" node - < .gitea/scripts/publish-releases.js