@@ -150,14 +150,14 @@ jobs:
150150 cat > artifacts/workflow_info.json <<EOF
151151 {
152152 "hw_tests_enabled": "$hw_tests_enabled",
153- "hw_targets": $hw_targets,
154- "hw_types": $hw_types,
153+ "hw_targets": " $hw_targets" ,
154+ "hw_types": " $hw_types" ,
155155 "wokwi_tests_enabled": "$wokwi_tests_enabled",
156- "wokwi_targets": $wokwi_targets,
157- "wokwi_types": $wokwi_types,
156+ "wokwi_targets": " $wokwi_targets" ,
157+ "wokwi_types": " $wokwi_types" ,
158158 "qemu_tests_enabled": "$qemu_tests_enabled",
159- "qemu_targets": $qemu_targets,
160- "qemu_types": $qemu_types,
159+ "qemu_targets": " $qemu_targets" ,
160+ "qemu_types": " $qemu_types" ,
161161 "ref": "$ref",
162162 "event": "${{ github.event.workflow_run.event }}",
163163 "sha": "${{ github.event.workflow_run.head_sha || github.sha }}",
@@ -289,8 +289,9 @@ jobs:
289289
290290 echo "enabled=$enabled" >> $GITHUB_OUTPUT
291291
292- - name : Wait for GitLab sync
292+ - name : Wait for GitLab sync and prepare variables
293293 if : ${{ steps.check-tests.outputs.enabled == 'true' }}
294+ id : prepare-variables
294295 env :
295296 PUSH_TIME : ${{ needs.get-artifacts.outputs.push_time }}
296297 run : |
@@ -332,6 +333,16 @@ jobs:
332333
333334 echo "Proceeding with GitLab pipeline trigger..."
334335
336+ # Replace double quotes with single quotes for the GitLab pipeline trigger
337+ test_types=$(printf '%s' "${{ needs.get-artifacts.outputs.hw_types }}" | sed "s/\"/'/g")
338+ test_chips=$(printf '%s' "${{ needs.get-artifacts.outputs.hw_targets }}" | sed "s/\"/'/g")
339+ echo "test_types=$test_types"
340+ echo "test_chips=$test_chips"
341+
342+ # Expose as step outputs
343+ echo "test_types=$test_types" >> $GITHUB_OUTPUT
344+ echo "test_chips=$test_chips" >> $GITHUB_OUTPUT
345+
335346 - name : Trigger GitLab Pipeline and Download Artifacts
336347 if : ${{ steps.check-tests.outputs.enabled == 'true' }}
337348 uses : digital-blueprint/gitlab-pipeline-trigger-action@20e77989b24af658ba138a0aa5291bdc657f1505 # v1.3.0
@@ -345,7 +356,7 @@ jobs:
345356 download_artifacts : ' true'
346357 download_artifacts_on_failure : ' true'
347358 download_path : ' ./gitlab-artifacts'
348- variables : ' {"TEST_TYPES":${{ toJson(needs.get-artifacts .outputs.hw_types) }},"TEST_CHIPS":${{ toJson(needs.get-artifacts .outputs.hw_targets) }},"PIPELINE_ID":${{ toJson( env.id) }},"BINARIES_RUN_ID":${{ toJson( github.event.workflow_run.id) }},"GITHUB_REPOSITORY":${{ toJson( github.repository) }}}'
359+ variables : ' {"TEST_TYPES":" ${{ steps.prepare-variables .outputs.test_types }}" ,"TEST_CHIPS":" ${{ steps.prepare-variables .outputs.test_chips }}" ,"PIPELINE_ID":" ${{ env.id }}" ,"BINARIES_RUN_ID":" ${{ github.event.workflow_run.id }}" ,"GITHUB_REPOSITORY":" ${{ github.repository }}" }'
349360
350361 - name : Process Downloaded Artifacts
351362 if : ${{ always() && steps.check-tests.outputs.enabled == 'true' }}
0 commit comments