ci: bypass maintenance gate for PR Test on main (#21082)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
name: Check Maintenance Mode
|
name: Check Maintenance Mode
|
||||||
description: Blocks CI when maintenance mode is active (issue #21065 is open), unless the PR has the bypass-maintenance label.
|
description: Blocks CI when maintenance mode is active (issue #21065 is open), unless the PR has the bypass-maintenance label, or env SGLANG_PR_TEST_BYPASS_MAINTENANCE_ON_MAIN=true (PR Test workflow on main only).
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
github-token:
|
github-token:
|
||||||
@@ -18,6 +18,12 @@ runs:
|
|||||||
REPO="${{ github.repository }}"
|
REPO="${{ github.repository }}"
|
||||||
PR_NUMBER="${{ github.event.pull_request.number }}"
|
PR_NUMBER="${{ github.event.pull_request.number }}"
|
||||||
|
|
||||||
|
# PR Test workflow only: scheduled runs and runs on main (dispatch / workflow_call) set this env
|
||||||
|
if [[ "${SGLANG_PR_TEST_BYPASS_MAINTENANCE_ON_MAIN:-}" == "true" ]]; then
|
||||||
|
echo "✅ PR Test on main branch; bypassing maintenance gate."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if maintenance issue is open (fail-open: if API errors, allow CI to proceed)
|
# Check if maintenance issue is open (fail-open: if API errors, allow CI to proceed)
|
||||||
ISSUE_STATE=$(gh issue view "$MAINTENANCE_ISSUE" --repo "$REPO" --json state --jq '.state' 2>/dev/null || echo "UNKNOWN")
|
ISSUE_STATE=$(gh issue view "$MAINTENANCE_ISSUE" --repo "$REPO" --json state --jq '.state' 2>/dev/null || echo "UNKNOWN")
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ env:
|
|||||||
SGLANG_IS_IN_CI: true
|
SGLANG_IS_IN_CI: true
|
||||||
SGLANG_CUDA_COREDUMP: "1"
|
SGLANG_CUDA_COREDUMP: "1"
|
||||||
SGLANG_JIT_DEEPGEMM_FAST_WARMUP: true
|
SGLANG_JIT_DEEPGEMM_FAST_WARMUP: true
|
||||||
|
# Schedule / main-branch dispatch / workflow_call from main use refs/heads/main; PR events use refs/pull/*/merge
|
||||||
|
SGLANG_PR_TEST_BYPASS_MAINTENANCE_ON_MAIN: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
|
|||||||
Reference in New Issue
Block a user