Scope the sidecar trailer by package so a mixed branch cannot lose it
CI / full-gate (push) Successful in 2m50s

This commit is contained in:
2026-08-22 12:01:35 +02:00
parent 6c07856159
commit d62c7faabd
6 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -28,8 +28,8 @@ test("the quick start's sidecars are pinned to the same versions this repo runs"
const pins = (source: string) =>
new Map([...source.matchAll(/image: ([^:\s]+):(v?\d\S*)/g)].map((m) => [m[1] ?? "", m[2] ?? ""]));
const ours = new Map([
...pins(readFileSync("compose.yml", "utf8")),
...pins(readFileSync("compose.override.yml", "utf8")),
...pins(readFileSync("compose.yml", "utf8")), // production wins: the template is the prod quick start
]);
const published = pins(template());
assert.ok(published.size > 0, "the template should pin sidecars");
+7 -1
View File
@@ -60,7 +60,13 @@ async function main(): Promise<number> {
if (!VERSION.test(version)) return fail(`version must be X.Y.Z, got ${JSON.stringify(version)}`);
const templatePath = join(import.meta.dirname, "dockerhub-overview.md.tmpl");
const body = renderOverview(readFileSync(templatePath, "utf8"), version);
let template = "";
try {
template = readFileSync(templatePath, "utf8");
} catch (err) {
return fail(`${templatePath}: ${err instanceof Error ? err.message : String(err)}`);
}
const body = renderOverview(template, version);
const leftover = leftoverPlaceholders(body);
if (leftover.length > 0) return fail(`${templatePath} has unrendered placeholders: ${leftover.join(", ")}`);