ci: publish portable containers after successful main deployment

This commit is contained in:
Simo committed 2026-09-07 23:02:18 +02:00
1 parent c4496e710b
commit f1571a1a62
3 files changed
+44 -4

No files matched your search

+14
View File
@@ -39,3 +39,17 @@ it("builds the checked out source without fetching a moving remote branch", () =
);
expect(dockerfile).not.toMatch(/^RUN\s+git\s+(?:pull|fetch|clone)\b/m);
});
it("publishes commit images after successful main deployment and preserves manual retries", () => {
const publish = workflow.slice(workflow.indexOf("\n publish-container:"));
expect(publish).toContain("needs: deploy");
expect(publish).toContain("gitea.event_name == 'push'");
expect(publish).toContain("gitea.ref_name == 'main'");
expect(publish).toContain("gitea.ref_name == 'master'");
expect(publish).toContain("bash scripts/publish-container.sh");
expect(publish).toContain("secrets.CONTAINER_REGISTRY_USER");
expect(publish).toContain("secrets.CONTAINER_REGISTRY_TOKEN");
const manual = readFileSync(".gitea/workflows/container.yaml", "utf8");
expect(manual).toContain("workflow_dispatch:");
expect(manual).not.toMatch(/^ {2}push:/m);
});