Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
uommou committed Mar 19, 2024
1 parent 078e705 commit 585add2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main, dev ]

env:
DOCKER_IMAGE: ghcr.io/${{ github.actor }}/myproject
DOCKER_IMAGE: ghcr.io/${{ github.actor }}/ness-fastapi
VERSION: ${{ github.sha }}
NAME: ness-fastapi
# Docker image 를 ghcr.io 에 올릴 때 우리의github이름/이미지이름 으로 저장한다. 이미지이름을 정해주면 된다.
Expand Down Expand Up @@ -62,10 +62,10 @@ jobs:

- name: Docker run
run: |
# docker stop ${{ env.NAME }} && docker rm ${{ env.NAME }} && docker rmi ${{ env.DOCKER_IMAGE }}:latest
# docker run -d -p 3000:3000 --name newproject --restart always ${{ env.DOCKER_IMAGE }}:latest
docker pull ${{ env.DOCKER_IMAGE }}:latest
docker stop ${{ env.NAME }} || true
docker rm ${{ env.NAME }} || true
docker rmi ${{ env.DOCKER_IMAGE }}:latest || true
docker run -d -p 3000:3000 --name ${{ env.NAME }} --restart always ${{ env.DOCKER_IMAGE }}:latest
docker stop ${{ env.NAME }} && docker rm ${{ env.NAME }} && docker rmi ${{ env.DOCKER_IMAGE }}:latest
docker run -d -p 3000:3000 --name ness-fastapi --restart always ${{ env.DOCKER_IMAGE }}:latest
# docker pull ${{ env.DOCKER_IMAGE }}:latest
# docker stop ${{ env.NAME }} || true
# docker rm ${{ env.NAME }} || true
# docker rmi ${{ env.DOCKER_IMAGE }}:latest || true
# docker run -d -p 3000:3000 --name ${{ env.NAME }} --restart always ${{ env.DOCKER_IMAGE }}:latest

0 comments on commit 585add2

Please sign in to comment.