From 7f839afb32cc82c21ba7df94bb1b5514a7fa9185 Mon Sep 17 00:00:00 2001 From: lilleman Date: Thu, 20 Aug 2026 23:02:21 +0200 Subject: [PATCH] Release nothing when no Renovate commit reached the app --- .gitea/workflows/renovate.yml | 6 +++++- README.md | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml index 10428c7..af25981 100644 --- a/.gitea/workflows/renovate.yml +++ b/.gitea/workflows/renovate.yml @@ -26,7 +26,8 @@ jobs: # After the renovate job, cut ONE tag covering the renovate-bot commits merged to main since the # last tag (batch per run). Targets origin/main — the real post-merge tip; the checkout SHA is the # trigger-time tip and lags the merges this run made. Skips when main's tip isn't a Renovate commit - # (a human owns that release) or nothing new merged. ff-only merges keep the renovate commit's + # (a human owns that release), nothing new merged, or nothing that merged carried a `Release-Bump:` + # trailer — a release nobody can observe is noise. ff-only merges keep the renovate commit's # authorship on the tip, so the author checks are reliable. Level = highest `Release-Bump:` trailer; # pre-1.0 shifts down (auto-release/next-version.ts). Tag-only — release.yml promotes the # already-built image; pushed with renovate-bot's PAT so release.yml fires (the built-in token won't). @@ -54,6 +55,9 @@ jobs: fi BUMPS=$(git log "${LATEST}..origin/main" --author='renovate@larvit.se' \ --format='%(trailers:key=Release-Bump,valueonly)' | { grep -vx '' || true; }) + if [ -z "$BUMPS" ]; then + echo "Renovate commits since ${LATEST}, but none carry Release-Bump — nothing reached a running Plainpages; skipping"; exit 0 + fi NEXT=$(docker run --rm -v "$PWD:/repo" -w /repo node:24.19.0-alpine3.24 \ node auto-release/next-version.ts "$LATEST" $BUMPS) echo "Releasing $LATEST -> $NEXT" diff --git a/README.md b/README.md index 51f9d64..31bafa7 100644 --- a/README.md +++ b/README.md @@ -1419,7 +1419,8 @@ exact. Each PR runs the normal gate on its `renovate/*` branch and automerges on **Auto-release on dependency updates** — a second job in `renovate.yml` (`auto-release`) cuts **one** `vX.Y.Z` tag per run covering the renovate-bot commits merged to `main` since the last tag, and -**skips** when the tip isn't a Renovate commit or nothing new merged. Renovate stamps a +**skips** when the tip isn't a Renovate commit, nothing new merged, or nothing that merged carried a +trailer — a dependency update that cannot reach the app releases nothing. Renovate stamps a `Release-Bump: ` trailer onto the updates that reach a running Plainpages — the root `package.json`'s runtime dependencies, the image base, and `compose.yml`'s services — and [`auto-release/next-version.ts`](auto-release/next-version.ts) turns the highest one into the next