Skip to content

Commit 76af0ff

Browse files
committed
Adding a wrapper workflow to call the deploy tests
Signed-off-by: pvijayakrish <[email protected]>
1 parent b9626d2 commit 76af0ff

File tree

2 files changed

+12
-66
lines changed

2 files changed

+12
-66
lines changed

.github/workflows/trigger-secure-deploy.yml

Lines changed: 6 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -15,61 +15,9 @@ on:
1515
type: string
1616

1717
jobs:
18-
validate-access:
19-
runs-on: ubuntu-latest
20-
outputs:
21-
authorized: ${{ steps.check.outputs.authorized }}
22-
steps:
23-
- name: Check User Authorization
24-
id: check
25-
run: |
26-
# Allow NVIDIA employees and approved bots
27-
allowed_actors=(
28-
"nvidia-employee1"
29-
"nvidia-employee2"
30-
"copy-pr-bot" # Allow the copy PR bot
31-
"nvidia-bot" # Allow other NVIDIA bots
32-
)
33-
34-
# Block external contributors
35-
blocked_patterns=(
36-
"external-"
37-
"contributor-"
38-
"guest-"
39-
)
40-
41-
actor="${{ github.actor }}"
42-
43-
# Check if actor is explicitly allowed
44-
for allowed in "${allowed_actors[@]}"; do
45-
if [[ "$actor" == "$allowed" ]]; then
46-
echo "authorized=true" >> $GITHUB_OUTPUT
47-
echo "✅ Authorized user: $actor"
48-
exit 0
49-
fi
50-
done
51-
52-
# Check if actor matches blocked patterns
53-
for pattern in "${blocked_patterns[@]}"; do
54-
if [[ "$actor" == *"$pattern"* ]]; then
55-
echo "❌ Blocked user pattern: $actor"
56-
echo "authorized=false" >> $GITHUB_OUTPUT
57-
exit 1
58-
fi
59-
done
60-
61-
# Default: block unknown users
62-
echo "❌ Unauthorized user: $actor"
63-
echo "authorized=false" >> $GITHUB_OUTPUT
64-
exit 1
65-
66-
trigger-deploy-tests:
67-
runs-on: ubuntu-latest
68-
needs: validate-access
69-
if: needs.validate-access.outputs.authorized == 'true'
70-
environment: protected-deploy # manual approval before triggering
71-
steps:
72-
- name: Call Secure Deploy Workflow
73-
uses: ./.github/workflows/container-validation-backends.yml
74-
with:
75-
run_deploy_operator: ${{ github.event.inputs.run_deploy_operator }}
18+
call-container-validation:
19+
uses: ./.github/workflows/container-validation-backends.yml
20+
with:
21+
run_deploy_operator: ${{ github.event.inputs.run_deploy_operator }}
22+
target_branch: ${{ github.event.inputs.target_branch }}
23+
environment: protected-deploy # manual approval before triggering

.github/workflows/trigger_ci.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ on:
1515
type: string
1616

1717
jobs:
18-
trigger-deploy-tests:
19-
runs-on: ubuntu-latest
20-
environment: protected-deploy # manual approval before triggering
21-
steps:
22-
- name: Call Secure Deploy Workflow
23-
uses: ./.github/workflows/container-validation-backends.yml
24-
with:
25-
run_deploy_operator: ${{ github.event.inputs.run_deploy_operator }}
18+
call-container-validation:
19+
uses: ./.github/workflows/container-validation-backends.yml
20+
with:
21+
run_deploy_operator: ${{ github.event.inputs.run_deploy_operator }}
22+
target_branch: ${{ github.event.inputs.target_branch }}
23+
environment: protected-deploy # manual approval before triggering

0 commit comments

Comments
 (0)