Skip to content

Commit 60c3821

Browse files
committed
Robust bash loop for multiline images string
1 parent 77a816f commit 60c3821

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ jobs:
109109
shell: bash
110110
run: |
111111
IMAGES="${{ needs.build.outputs.image }}"
112-
for img in $IMAGES; do
112+
while read -r img; do
113113
docker pull "$img"
114-
done
114+
done <<< "$IMAGES"
115115
116116
- name: Download and load image artifact for pull_request runs
117117
if: github.event_name == 'pull_request'
@@ -132,7 +132,7 @@ jobs:
132132
LIB_EXTENSION: ${{ matrix.lib_extension }}
133133
run: |
134134
IMAGES="${{ needs.build.outputs.image }}"
135-
for img in $IMAGES; do
135+
while read -r img; do
136136
docker run --rm \
137137
-v "${{ github.workspace }}":/work \
138138
-w /work \
@@ -145,7 +145,7 @@ jobs:
145145
cmake --build test/resources/FMU_Interaction1/sources/build_${TOOLCHAIN} --target install && \
146146
test -f test/resources/FMU_Interaction1/binaries/${FMI_PLATFORM_TUPLE}/Interaction1.${LIB_EXTENSION} && \
147147
cmake --build test/resources/FMU_Interaction1/sources/build_${TOOLCHAIN} --target create_fmu"
148-
done
148+
done <<< "$IMAGES"
149149
150150
- name: Upload Interaction1.fmu
151151
uses: actions/upload-artifact@v5

0 commit comments

Comments
 (0)