Accept Gitea's trailing-slash server URL in the deploy guard
Mesh CI and deploy / container (push) Successful in 14m13s
Mesh CI and deploy / checks (push) Successful in 32m6s
Mesh CI and deploy / deploy (push) Successful in 9m59s

Gitea evaluates job conditions with its ROOT_URL, https://git.waozi.xyz/,
so the exact comparison skipped the deploy job after every gate passed.
The runtime check in the deploy job strips the same trailing slash.
This commit is contained in:
waozi committed 2026-11-22 20:42:46 -03:00
1 parent 12226b595b
commit b4ea4c2399
2 files changed
+4 -3

No files matched your search

+2 -2
View File
@@ -254,7 +254,7 @@ jobs:
deploy:
needs: [checks, container]
if: >-
github.server_url == 'https://git.waozi.xyz' &&
(github.server_url == 'https://git.waozi.xyz' || github.server_url == 'https://git.waozi.xyz/') &&
github.repository == 'ziranlang/mesh' && github.ref == 'refs/heads/master' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
vars.MESH_DEPLOY_READY == 'true' && vars.MESH_DEPLOY_RUNNER != ''
@@ -265,7 +265,7 @@ jobs:
steps:
- name: Verify canonical deployment context
run: |
test "$GITHUB_SERVER_URL" = https://git.waozi.xyz
test "${GITHUB_SERVER_URL%/}" = https://git.waozi.xyz
test "$GITHUB_REPOSITORY" = ziranlang/mesh
test "$GITHUB_REF" = refs/heads/master
case "$GITHUB_EVENT_NAME" in push|workflow_dispatch) ;; *) exit 1 ;; esac
+2 -1
View File
@@ -35,7 +35,8 @@ class GiteaWorkflowTest(unittest.TestCase):
self.assertEqual(set(deploy["needs"]), REQUIRED_JOBS)
self.assertEqual(set(self.jobs), REQUIRED_JOBS | {"deploy"})
for guard in (
"github.server_url == 'https://git.waozi.xyz'",
# Gitea evaluates job conditions with its ROOT_URL, which ends in a slash.
"(github.server_url == 'https://git.waozi.xyz' || github.server_url == 'https://git.waozi.xyz/')",
"github.repository == 'ziranlang/mesh'",
"github.ref == 'refs/heads/master'",
"(github.event_name == 'push' || github.event_name == 'workflow_dispatch')",