Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/CI-CD_Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ jobs:
- uses: actions/checkout@v4

- name: Set lowercase repo name
run: echo "IMAGE_PREFIX=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
run: |
echo "IMAGE_PREFIX=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Download backend jar
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -194,7 +195,8 @@ jobs:

steps:
- name: Set lowercase repo name
run: echo "IMAGE_PREFIX=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
run: |
echo "IMAGE_PREFIX=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Create prod .env file
run: |
Expand Down Expand Up @@ -238,8 +240,8 @@ jobs:

# 최신 이미지 pull & 컨테이너 실행
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ env.DOCKER_IMAGE_NAME }}:latest
docker stop app1 2>/dev/null
docker rm app1 2>/dev/null
docker stop app1 2>/dev/null || true
docker rm app1 2>/dev/null || true
docker run --env-file /home/ec2-user/prod.env -d --name app1 -p 8080:8080 \
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ env.DOCKER_IMAGE_NAME }}:latest

Expand Down