Skip to content

Commit c6897f1

Browse files
fixup! fixup! fixup! IONOS(github): POC use matrix
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
1 parent 4095209 commit c6897f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/sbom-matrix.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ jobs:
184184
if: matrix.component.has_composer && matrix.component.has_npm
185185
run: |
186186
# Create a combined SBOM by merging PHP and NPM components
187+
output_path_npm="${{ matrix.component.path == '.' && matrix.component.npm_output || format('../../{0}', matrix.component.npm_output) }}"
188+
output_path_composer="${{ matrix.component.path == '.' && matrix.component.composer_output || format('../../{0}', matrix.component.composer_output) }}"
187189
jq -s '
188190
{
189191
"bomFormat": "CycloneDX",
@@ -200,7 +202,7 @@ jobs:
200202
},
201203
"components": (.[0].components + .[1].components | unique_by(.name + .version + .type))
202204
}
203-
' ${{ matrix.component.composer_output }} ${{ matrix.component.npm_output }} > bom.${{ matrix.component.name }}-combined-sbom.json
205+
' ${output_path_npm} ${output_path_composer} > bom.${{ matrix.component.name }}-combined-sbom.json
204206
205207
- name: Upload component SBOM artifacts
206208
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)