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
17 changes: 6 additions & 11 deletions .github/workflows/cd-workflow-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: 🧾 Create application.yml from secret (base64)
run: |
mkdir -p ${{ env.RESOURCE_PATH }}
echo "${{ secrets.APPLICATION_YML_DEV }}" | base64 --decode > ${{ env.RESOURCE_PATH }}/application.yml
echo "${{ secrets.APPLICATION_YML_PROD }}" | base64 --decode > ${{ env.RESOURCE_PATH }}/application.yml
shell: bash

- name: 🔐 Create Firebase Key from secret (base64)
Expand Down Expand Up @@ -73,16 +73,11 @@ jobs:
script: |
echo "🗂️ Change Directory to Compose Path"
cd ${{ env.COMPOSE_PATH }}

echo "✋🏻Stopping existing container and Cleaning up old images"
sudo docker-compose stop ${{ secrets.DOCKER_IMAGE }}
sudo docker rm -f ${{ secrets.DOCKER_IMAGE }}


sudo docker ps -a

echo "🥳 Pulling new image"
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }}

echo "🌱 Starting new container"
sudo docker-compose up -d
sudo docker image prune -a -f

echo "🚀 Run Blue-Green Deploy Script"
sudo bash deploy.sh
Comment on lines 79 to +83

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major

이미지 태그를 불변 값으로 고정하세요. docker pull이 태그 없이 실행돼 동시 CD에서 다른 실행이 푸시한 최신 이미지가 배포될 수 있습니다. GITHUB_SHA 같은 고정 태그를 build/push/pull/deploy.sh 전반에 일관되게 전달하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cd-workflow-dev.yml around lines 79 - 83, Make the
deployment image reference immutable by using a fixed tag instead of pulling the
default latest image in the CD workflow. Update the image naming flow in the
workflow and the deploy.sh handoff so build, push, pull, and deploy all use the
same tag derived from GITHUB_SHA (or another unique commit-based tag), and
ensure the docker pull command in the deployment step references that exact tag
consistently.

Loading