Skip to content

Commit

Permalink
chore: 이전 이미지가 존재할 때 이미지 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
seoko97 committed Oct 10, 2023
1 parent 898c00b commit c92d8ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ jobs:
run: |
if [ `docker ps -f "name=front" -q` ]
then
docker rm -f $(docker ps -f "name=front" -q)
docker rm -f $(docker ps -f "name=${{secrets.FRONT_DOCKER_IMAGE_NAME}}" -q)
docker rmi -f $( docker images -f "reference=${{secrets.DOCKER_REGISTRY_URL}}/${{secrets.FRONT_DOCKER_IMAGE_NAME}}" -q)
fi
docker image prune -a
docker pull ${{secrets.DOCKER_REGISTRY_URL}}/${{secrets.FRONT_DOCKER_IMAGE_NAME}}:${{ github.sha }}
Expand Down

0 comments on commit c92d8ba

Please sign in to comment.