Skip to content

Commit 42f87f2

Browse files
authored
cherry-pick/minor fix: Parse out slashes in Docker container name (#2437) (#2438)
1 parent 6ba4f05 commit 42f87f2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/docker_builder.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
- name: Checkout repository
2929
uses: actions/checkout@v3
3030

31+
- name: Fix Slashes Repo Name
32+
id: fix_slashes
33+
run: |
34+
export container_name=$(echo ${{ env.CONTAINER_NAME }} | sed 's|/|_|g')
35+
echo ::set-output name=container_name::$container_name
36+
3137
- name: Log in to the Container registry
3238
uses: docker/login-action@v2
3339
with:
@@ -38,7 +44,7 @@ jobs:
3844
# Automatically detect TensorRT and cuDNN default versions for Torch-TRT build
3945
- name: Build Docker image
4046
env:
41-
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
47+
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
4248
run: |
4349
python3 -m pip install pyyaml
4450
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
@@ -50,7 +56,7 @@ jobs:
5056
5157
- name: Push Docker image
5258
env:
53-
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
59+
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
5460
run: docker push $DOCKER_URL
5561

5662
# Clean up all untagged containers in registry

0 commit comments

Comments
 (0)