@@ -21,11 +21,21 @@ jobs:
21
21
timeout-minutes : 60
22
22
outputs :
23
23
pipenv-activate : ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }}
24
+ runner-id : ${{ steps.get-runner-id.outputs.runner_id }}
24
25
steps :
25
26
- name : ' preparation: Harden Runner'
26
27
uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
27
28
with :
28
29
egress-policy : audit
30
+ - name : ' preparation: Get Runner ID'
31
+ id : get-runner-id
32
+ run : |
33
+ # Extract runner number from RUNNER_NAME (e.g., "cicd-1" -> "1")
34
+ RUNNER_NUMBER=$(echo "$RUNNER_NAME" | grep -o '[0-9]\+$' || echo "1")
35
+ # Format as runner-X
36
+ RUNNER_ID="runner-${RUNNER_NUMBER}"
37
+ echo "runner_id=$RUNNER_ID" >> "$GITHUB_OUTPUT"
38
+ echo "Using runner ID: $RUNNER_ID (from runner name: $RUNNER_NAME)"
29
39
- name : ' preparation: Restore valid repository owner and print env'
30
40
if : always()
31
41
run : |
@@ -126,14 +136,14 @@ jobs:
126
136
echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV"
127
137
validation-run-tests :
128
138
needs : [validation-build-mtl]
129
- runs-on : [Linux, self-hosted, DPDK ]
139
+ runs-on : [self-hosted, "${{ needs.validation-build-mtl.outputs.runner-id }}" ]
130
140
timeout-minutes : 720
131
141
env :
132
142
PYTEST_RETRIES : ' 3'
133
143
steps :
134
144
- name : Replace secrets in example config files
135
145
run : |
136
- sed -i "s+MTL_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_MTL_PATH }}+" tests/validation/configs/test_config.yaml
146
+ sed -i "s+MTL_PATH_PLACEHOLDER+${{ github.workspace }}+" tests/validation/configs/test_config.yaml
137
147
sed -i "s/IP_ADDRESS_PLACEHOLDER/${{ secrets.BARE_METAL_IP_ADDRESS }}/" tests/validation/configs/topology_config.yaml
138
148
sed -i "s/SSH_PORT_PLACEHOLDER/${{ secrets.BARE_METAL_SSH_PORT }}/" tests/validation/configs/topology_config.yaml
139
149
sed -i "s/USERNAME_PLACEHOLDER/${{ secrets.BARE_METAL_USERNAME }}/" tests/validation/configs/topology_config.yaml
@@ -167,6 +177,7 @@ jobs:
167
177
run : |
168
178
sudo tests/validation/venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m smoke --template=html/index.html --report=report.html
169
179
- name : " upload report"
180
+ if : always()
170
181
id : upload-report
171
182
uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
172
183
with :
0 commit comments