File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: 'Torch-TensorRT Docker Build'
2
2
3
3
# Apply workflow only to main branch
4
4
on :
5
+ pull_request :
5
6
push :
6
7
branches :
7
8
- main
28
29
- name : Checkout repository
29
30
uses : actions/checkout@v3
30
31
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
+
31
38
- name : Log in to the Container registry
32
39
uses : docker/login-action@v2
33
40
with :
38
45
# Automatically detect TensorRT and cuDNN default versions for Torch-TRT build
39
46
- name : Build Docker image
40
47
env :
41
- DOCKER_TAG : ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
48
+ DOCKER_TAG : ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
42
49
run : |
43
50
python3 -m pip install pyyaml
44
51
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
50
57
51
58
- name : Push Docker image
52
59
env :
53
- DOCKER_URL : ${{ env.DOCKER_REGISTRY }}/${{ env.CONTAINER_NAME }}
60
+ DOCKER_URL : ${{ env.DOCKER_REGISTRY }}/${{ steps.fix_slashes.outputs.container_name }}
54
61
run : docker push $DOCKER_URL
55
62
56
63
# Clean up all untagged containers in registry
You can’t perform that action at this time.
0 commit comments