Skip to content

Commit acad3db

Browse files
committed
minor fix: Parse out slashes in Docker container name (#2437)
1 parent 26d6b2e commit acad3db

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
@@ -27,6 +27,12 @@ jobs:
2727
- name: Checkout repository
2828
uses: actions/checkout@v3
2929

30+
- name: Fix Slashes Repo Name
31+
id: fix_slashes
32+
run: |
33+
export container_name=$(echo ${{ env.CONTAINER_NAME }} | sed 's|/|_|g')
34+
echo ::set-output name=container_name::$container_name
35+
3036
- name: Log in to the Container registry
3137
uses: docker/login-action@v2
3238
with:
@@ -37,7 +43,7 @@ jobs:
3743
# Automatically detect TensorRT and cuDNN default versions for Torch-TRT build
3844
- name: Build Docker image
3945
env:
40-
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
46+
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
4147
run: |
4248
python3 -m pip install pyyaml
4349
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
@@ -49,7 +55,7 @@ jobs:
4955
5056
- name: Push Docker image
5157
env:
52-
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
58+
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
5359
run: docker push $DOCKER_URL
5460

5561
# Clean up all untagged containers in registry

0 commit comments

Comments
 (0)