File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 12
12
13
13
env :
14
14
DOCKERHUB_REPOSITORY : ody-official
15
+ DOCKER_CONTAINER_NAME : ody-backend
15
16
16
17
jobs :
17
18
build-docker-push :
68
69
- name : Pull Docker image from DockerHub
69
70
run : docker pull --platform linux/x64/v8 ${{ secrets.DOCKERHUB_USERNAME }}/$DOCKERHUB_REPOSITORY:${{ github.sha }}
70
71
71
- - name : Stop existing Docker container
72
- run : docker stop $DOCKERHUB_REPOSITORY || true
73
-
74
- - name : Remove existing Docker container
75
- run : docker rm $DOCKERHUB_REPOSITORY || true
76
-
77
72
- name : Run new Docker container
78
- run : docker run -d --name ody-backend -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/$DOCKERHUB_REPOSITORY:${{ github.sha }}
73
+ run : |
74
+ docker stop $DOCKER_CONTAINER_NAME || true
75
+ docker rm $DOCKER_CONTAINER_NAME || true
76
+ docker run -d --name $DOCKER_CONTAINER_NAME -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/$DOCKERHUB_REPOSITORY:${{ github.sha }}
You can’t perform that action at this time.
0 commit comments