ci(server): skip image publication for GitHub prereleases

This commit is contained in:
aj committed 2026-10-08 19:17:15 -04:00
1 parent 8628c69098
commit a73a85ebc0
3 files changed
+13 -3

No files matched your search

+7
View File
@@ -698,6 +698,13 @@ class ImmutableTagCollisions(unittest.TestCase):
class WorkflowBehavior(unittest.TestCase):
def test_prerelease_skips_ghcr_publish_but_stable_release_and_manual_dispatch_remain(self):
workflow = pathlib.Path(__file__).resolve().parents[1] / ".github/workflows/server-image.yml"
publish = workflow.read_text().split("\n publish:\n", 1)[1].split("\n verify-published:\n", 1)[0]
condition = publish.split(" if: >-\n", 1)[1].split(" runs-on:", 1)[0]
self.assertIn("github.event_name == 'release' && github.event.release.prerelease == false", condition)
self.assertIn("github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master'", condition)
def test_build_log_pipeline_preserves_docker_failure(self):
workflow = pathlib.Path(__file__).resolve().parents[1] / ".github/workflows/server-image.yml"
lines = workflow.read_text().splitlines()