Skip to content

Commit

Permalink
[hotfix] nginx 컨테이너 종료되는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
baekjaehyuk committed Jan 16, 2025
1 parent 2cc0532 commit d9a7901
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ jobs:

- name: Stop and remove existing containers
run: |
sudo docker ps -aq | xargs -r sudo docker stop | xargs -r sudo docker rm
CONTAINER_IDS=$(sudo docker ps -aq --filter "name=github-actions-demo")
if [ -n "$CONTAINER_IDS" ]; then
sudo docker stop $CONTAINER_IDS
sudo docker rm $CONTAINER_IDS
fi
- name: Run new container
run: sudo docker run --name github-actions-demo --rm -d -p 8080:8080 ${{ secrets.DOCKER_USERNAME }}/github-actions-demo
Expand Down

0 comments on commit d9a7901

Please sign in to comment.