From 6f6bec26d26a1168cc33a993f310f52c92a27d35 Mon Sep 17 00:00:00 2001 From: George S <113141689+gs-olive@users.noreply.github.com> Date: Mon, 6 Nov 2023 11:59:43 -0800 Subject: [PATCH] minor fix: Parse out slashes in Docker container name (#2437) --- .github/workflows/docker_builder.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_builder.yml b/.github/workflows/docker_builder.yml index 99b6efe53e..91211dd52e 100644 --- a/.github/workflows/docker_builder.yml +++ b/.github/workflows/docker_builder.yml @@ -28,6 +28,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Fix Slashes Repo Name + id: fix_slashes + run: | + export container_name=$(echo ${{ env.CONTAINER_NAME }} | sed 's|/|_|g') + echo ::set-output name=container_name::$container_name + - name: Log in to the Container registry uses: docker/login-action@v2 with: @@ -38,7 +44,7 @@ jobs: # Automatically detect TensorRT and cuDNN default versions for Torch-TRT build - name: Build Docker image env: - DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }} + DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }} run: | python3 -m pip install pyyaml TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()") @@ -50,7 +56,7 @@ jobs: - name: Push Docker image env: - DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }} + DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }} run: docker push $DOCKER_URL # Clean up all untagged containers in registry