Skip to content

Commit d90deab

Browse files
yuluo-yxrootfs
andauthored
infra(ci): add GHA exec condition (#619)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> Co-authored-by: Huamin Chen <rootfs@users.noreply.github.com>
1 parent 183e8f4 commit d90deab

13 files changed

+33
-16
lines changed

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ on:
3232
jobs:
3333
# Build job for multi-architecture Docker images
3434
build_multiarch:
35+
if: github.repository == 'vllm-project/semantic-router'
3536
runs-on: ubuntu-latest
3637
permissions:
3738
contents: read
@@ -228,11 +229,11 @@ jobs:
228229
# Create multi-arch manifest for final images
229230
create_manifest:
230231
needs: build_multiarch
232+
if: github.repository == 'vllm-project/semantic-router' && github.event_name != 'pull_request'
231233
runs-on: ubuntu-latest
232234
permissions:
233235
contents: read
234236
packages: write
235-
if: github.event_name != 'pull_request'
236237
strategy:
237238
matrix:
238239
image: [extproc, llm-katan, dashboard]

.github/workflows/docker-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
build_and_push_extproc:
10+
if: github.repository == 'vllm-project/semantic-router'
1011
runs-on: ubuntu-latest
1112
permissions:
1213
contents: read
@@ -48,6 +49,7 @@ jobs:
4849
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/extproc:latest
4950
5051
build_and_push_llm_katan:
52+
if: github.repository == 'vllm-project/semantic-router'
5153
runs-on: ubuntu-latest
5254
permissions:
5355
contents: read
@@ -96,6 +98,7 @@ jobs:
9698
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:latest
9799
98100
build_and_push_dashboard:
101+
if: github.repository == 'vllm-project/semantic-router'
99102
runs-on: ubuntu-latest
100103
permissions:
101104
contents: read

.github/workflows/k8s-config-test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
jobs:
1313
test-with-custom-config:
1414
name: Test with Custom Configuration
15+
if: ${{ github.repository == 'vllm-project/semantic-router' }}
1516
runs-on: ubuntu-latest
1617

1718
steps:
@@ -74,7 +75,7 @@ jobs:
7475
if [ -d "deploy/kubernetes/ai-gateway/semantic-router/observability" ]; then
7576
kustomize build deploy/kubernetes/ai-gateway/semantic-router/observability > /tmp/observability-manifests.yaml
7677
echo "✓ Observability kustomization is valid"
77-
78+
7879
# Verify expected resources
7980
for resource in "Deployment" "Service" "ConfigMap" "PersistentVolumeClaim"; do
8081
if ! grep -q "kind: $resource" /tmp/observability-manifests.yaml; then
@@ -99,7 +100,7 @@ jobs:
99100
kubectl create --dry-run=client -f "$yaml_file" || echo "Warning: Issues with $yaml_file"
100101
fi
101102
done
102-
103+
103104
# Validate inference-pool manifests (skip CRD validation as they may not be installed)
104105
for yaml_file in deploy/kubernetes/ai-gateway/semantic-router/ai-gateway/inference-pool/*.yaml; do
105106
if [ -f "$yaml_file" ]; then
@@ -108,7 +109,7 @@ jobs:
108109
kubectl create --dry-run=client -f "$yaml_file" 2>&1 | grep -q "no matches for kind" && echo "✓ $yaml_file syntax valid (CRD not installed)" || echo "Validated $yaml_file"
109110
fi
110111
done
111-
112+
112113
echo "✓ AI Gateway configuration validation completed"
113114
else
114115
echo "AI Gateway directory not found, skipping..."

.github/workflows/k8s-integration-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ env:
4343
jobs:
4444
# Step 1: Validate Kubernetes manifests
4545
validate-manifests:
46+
if: github.repository == 'vllm-project/semantic-router'
4647
uses: ./.github/workflows/k8s-validate-manifests.yml
4748
with:
4849
kustomize_version: v5.7.1
4950

5051
# Step 2: Run kind cluster integration test
5152
kind-integration-test:
53+
if: github.repository == 'vllm-project/semantic-router'
5254
uses: ./.github/workflows/k8s-kind-integration-test.yml
5355
needs: validate-manifests
5456
with:
@@ -65,13 +67,15 @@ jobs:
6567

6668
# Step 4: Test with custom configurations
6769
test-with-custom-config:
70+
if: github.repository == 'vllm-project/semantic-router'
6871
uses: ./.github/workflows/k8s-config-test.yml
6972
needs: validate-manifests
7073
with:
7174
kustomize_version: v5.7.1
7275

7376
# Step 5: Run security scans
7477
security-scan:
78+
if: github.repository == 'vllm-project/semantic-router'
7579
uses: ./.github/workflows/k8s-security-scan.yml
7680
needs: validate-manifests
7781
with:
@@ -80,6 +84,7 @@ jobs:
8084
# Step 6: Generate test summary
8185
summary:
8286
name: Test Summary
87+
if: github.repository == 'vllm-project/semantic-router' && always()
8388
runs-on: ubuntu-latest
8489
needs:
8590
[
@@ -88,7 +93,6 @@ jobs:
8893
test-with-custom-config,
8994
security-scan,
9095
]
91-
if: always()
9296

9397
steps:
9498
- name: Check test results

.github/workflows/k8s-kind-integration-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
kind-integration-test:
1919
name: kind Cluster Integration Test
2020
runs-on: ubuntu-latest
21+
if: ${{ github.repository == 'vllm-project/semantic-router' }}
2122
timeout-minutes: 45 # Increased to account for model downloads
2223

2324
steps:

.github/workflows/k8s-security-scan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
jobs:
1313
security-scan:
1414
name: Security Scan for K8s Manifests
15+
if: ${{ github.repository == 'vllm-project/semantic-router' }}
1516
runs-on: ubuntu-latest
1617

1718
steps:

.github/workflows/k8s-validate-manifests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
jobs:
1313
validate-manifests:
1414
name: Validate Kubernetes Manifests
15+
if: ${{ github.repository == 'vllm-project/semantic-router' }}
1516
runs-on: ubuntu-latest
1617

1718
steps:

.github/workflows/owner-notification.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
contents: read
1313
pull-requests: write
1414
issues: write
15-
15+
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
@@ -36,11 +36,11 @@ jobs:
3636
script: |
3737
const fs = require('fs');
3838
const path = require('path');
39-
39+
4040
// Get changed files
4141
const changedFiles = `${{ steps.changed-files.outputs.all_changed_files }}`.split(' ');
4242
console.log('Changed files:', changedFiles);
43-
43+
4444
// Function to find OWNER file for a given file path
4545
function findOwnerFile(filePath) {
4646
const parts = filePath.split('/');
@@ -151,8 +151,8 @@ jobs:
151151
});
152152
153153
// Check if we already have an owner notification comment
154-
const existingComment = comments.find(comment =>
155-
comment.user.login === 'github-actions[bot]' &&
154+
const existingComment = comments.find(comment =>
155+
comment.user.login === 'github-actions[bot]' &&
156156
comment.body.includes('## 👥 vLLM Semantic Team Notification')
157157
);
158158

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
pre-commit:
12+
if: github.repository == 'vllm-project/semantic-router'
1213
runs-on: ubuntu-latest
1314
name: Run pre-commit hooks check file lint
1415

.github/workflows/precommit-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
jobs:
1212
build_and_push:
13+
if: github.repository == 'vllm-project/semantic-router'
1314
runs-on: ubuntu-latest
1415
permissions:
1516
contents: read

0 commit comments

Comments
 (0)