99 - main
1010 - " pull-request/[0-9]+"
1111 - release/*.*.*
12- workflow_dispatch :
12+ workflow_call :
1313 inputs :
1414 run_deploy_operator :
1515 description : ' Run deploy operator and deployment tests'
1616 required : false
17- default : false
1817 type : boolean
18+ default : false
1919
2020concurrency :
2121 # The group name is a ternary operation. If the ref_name is 'main',
@@ -25,9 +25,13 @@ concurrency:
2525 group : docker-build-test-${{ github.ref_name == 'main' && github.run_id || github.ref_name }}
2626 cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
2727
28+ env_anchor : &secure_env
29+ environment : ${{ github.event_name == 'workflow_call' && 'protected-deploy' || '' }}
30+
2831jobs :
2932 changed-files :
3033 runs-on : ubuntu-latest
34+ << : *secure_env
3135 outputs :
3236 has_code_changes : ${{ steps.filter.outputs.has_code_changes }}
3337 steps :
4145
4246 backend-status-check :
4347 runs-on : ubuntu-latest
48+ << : *secure_env
4449 needs : [vllm, sglang, trtllm, operator]
4550 if : always()
4651 steps :
5156 operator :
5257 needs : changed-files
5358 if : needs.changed-files.outputs.has_code_changes == 'true'
59+ << : *secure_env
5460 strategy :
5561 fail-fast : false
5662 matrix :
@@ -131,6 +137,7 @@ jobs:
131137 vllm :
132138 needs : changed-files
133139 if : needs.changed-files.outputs.has_code_changes == 'true'
140+ << : *secure_env
134141 strategy :
135142 fail-fast : false
136143 matrix :
@@ -200,6 +207,7 @@ jobs:
200207 sglang :
201208 needs : changed-files
202209 if : needs.changed-files.outputs.has_code_changes == 'true'
210+ << : *secure_env
203211 strategy :
204212 fail-fast : false
205213 matrix :
@@ -267,6 +275,7 @@ jobs:
267275 trtllm :
268276 needs : changed-files
269277 if : needs.changed-files.outputs.has_code_changes == 'true'
278+ << : *secure_env
270279 strategy :
271280 fail-fast : false
272281 matrix :
@@ -334,6 +343,7 @@ jobs:
334343 deploy-test-fault-tolerance :
335344 runs-on : cpu-amd-m5-2xlarge
336345 if : needs.changed-files.outputs.has_code_changes == 'true'
346+ << : *secure_env
337347 needs : [changed-files, operator, vllm, trtllm, sglang]
338348 permissions :
339349 contents : read
@@ -477,6 +487,7 @@ jobs:
477487 # Upload metrics for this workflow and all its jobs
478488 upload-workflow-metrics :
479489 name : Upload Workflow Metrics
490+ << : *secure_env
480491 runs-on : gitlab
481492 if : always() # Always run, even if other jobs fail
482493 needs : [backend-status-check] # Wait for the status check which waits for all build jobs
@@ -528,6 +539,7 @@ jobs:
528539 runs-on : cpu-amd-m5-2xlarge
529540 # TODO: Uncomment this when we have a way to test the deploy-operator job in CI.
530541 # if: needs.changed-files.outputs.has_code_changes == 'true'
542+ << : *secure_env
531543 if : inputs.run_deploy_operator
532544 needs : [changed-files, operator, vllm, sglang, trtllm]
533545 env :
@@ -607,6 +619,7 @@ jobs:
607619 # TODO: Uncomment this when we have a way to test the deploy-test-vllm job in CI.
608620 # if: needs.changed-files.outputs.has_code_changes == 'true'
609621 if : inputs.run_deploy_operator
622+ << : *secure_env
610623 needs : [changed-files, deploy-operator, vllm]
611624 permissions :
612625 contents : read
@@ -763,6 +776,7 @@ jobs:
763776 # TODO: Uncomment this when we have a way to test the deploy-test-sglang job in CI.
764777 # if: needs.changed-files.outputs.has_code_changes == 'true'
765778 if : inputs.run_deploy_operator
779+ << : *secure_env
766780 needs : [changed-files, deploy-operator, sglang]
767781 permissions :
768782 contents : read
@@ -786,6 +800,7 @@ jobs:
786800 # TODO: Uncomment this when we have a way to test the deploy-test-trtllm job in CI.
787801 # if: needs.changed-files.outputs.has_code_changes == 'true'
788802 if : inputs.run_deploy_operator
803+ << : *secure_env
789804 needs : [changed-files, deploy-operator, trtllm]
790805 permissions :
791806 contents : read
@@ -811,6 +826,7 @@ jobs:
811826 # TODO: Uncomment the below if statement when we have a way to test the cleanup job in CI.
812827 # if: always()
813828 if : inputs.run_deploy_operator
829+ << : *secure_env
814830 needs : [changed-files, deploy-operator, deploy-test-trtllm, deploy-test-sglang, deploy-test-vllm]
815831 steps :
816832 - name : Output Node Name
0 commit comments