Skip to content

Commit d52956f

Browse files
committed
minor fix: Parse out slashes in Docker container name
1 parent a25a512 commit d52956f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/docker_builder.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 'Torch-TensorRT Docker Build'
22

33
# Apply workflow only to main branch
44
on:
5+
pull_request:
56
push:
67
branches:
78
- main
@@ -28,6 +29,12 @@ jobs:
2829
- name: Checkout repository
2930
uses: actions/checkout@v3
3031

32+
- name: Fix Slashes Repo Name
33+
id: fix_slashes
34+
run: |
35+
export container_name=$(echo ${{ env.CONTAINER_NAME }} | sed 's|/|_|g')
36+
echo ::set-output name=container_name::$container_name
37+
3138
- name: Log in to the Container registry
3239
uses: docker/login-action@v2
3340
with:
@@ -38,7 +45,7 @@ jobs:
3845
# Automatically detect TensorRT and cuDNN default versions for Torch-TRT build
3946
- name: Build Docker image
4047
env:
41-
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
48+
DOCKER_TAG: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
4249
run: |
4350
python3 -m pip install pyyaml
4451
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
@@ -50,7 +57,7 @@ jobs:
5057
5158
- name: Push Docker image
5259
env:
53-
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
60+
DOCKER_URL: ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
5461
run: docker push $DOCKER_URL
5562

5663
# Clean up all untagged containers in registry

0 commit comments

Comments
 (0)