Skip to content

Commit ec0f3b7

Browse files
committed
CI: Change ${RUNNER_NAME} to ${RUNNER_NAME// /_} because runner name may contain spaces.
1 parent 91a2383 commit ec0f3b7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/pytest-gpu.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ jobs:
7676

7777
- name: Set per-runner tags
7878
run: |
79-
echo "DOCKER_IMAGE=${{ matrix.name }}-$RUNNER_NAME" >> $GITHUB_ENV
80-
echo "CONTAINER_BASENAME=testrun-${{ matrix.name }}-$RUNNER_NAME" >> $GITHUB_ENV
79+
echo "DOCKER_IMAGE=${{ matrix.name }}-${RUNNER_NAME// /_}" >> $GITHUB_ENV
80+
echo "CONTAINER_BASENAME=testrun-${{ matrix.name }}-${RUNNER_NAME// /_}" >> $GITHUB_ENV
8181
8282
- name: Ensure buildx builder
8383
run: |
84-
docker buildx inspect "$RUNNER_NAME" >/dev/null 2>&1 || \
85-
docker buildx create --name "$RUNNER_NAME" --driver docker-container
86-
docker buildx use "$RUNNER_NAME"
84+
docker buildx inspect "${RUNNER_NAME// /_}" >/dev/null 2>&1 || \
85+
docker buildx create --name "${RUNNER_NAME// /_}" --driver docker-container
86+
docker buildx use "${RUNNER_NAME// /_}"
8787
8888
- name: Build docker image
8989
run: |
9090
docker buildx build . \
91-
--builder "$RUNNER_NAME" \
91+
--builder "${RUNNER_NAME// /_}" \
9292
--load \
9393
--label ci-run=$GITHUB_RUN_ID \
9494
--rm --pull \
@@ -152,6 +152,6 @@ jobs:
152152
docker image prune -f --filter label=ci-run=$GITHUB_RUN_ID
153153
154154
# BuildKit cache: target the per-runner builder explicitly
155-
docker builder prune --builder "$RUNNER_NAME" \
155+
docker builder prune --builder "${RUNNER_NAME// /_}" \
156156
-f \
157157
--filter "until=72h"

0 commit comments

Comments
 (0)