Skip to content

Commit

Permalink
fix: CD workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhoJJang committed Aug 16, 2024
1 parent 34b7404 commit 9f5a988
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/nextjs-prod-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
KCR_REGISTRY="${{ env.KCR_REGISTRY }}"
KCR_REPOSITORY="${{ env.KCR_REPOSITORY }}"
VERSION="${{ steps.get_version.outputs.version }}"
AK="${{ env.ACCESS_KEY }}"
SK="${{ env.ACCESS_SECRET_KEY }}"
for host in "${HOSTS[@]}"
do
Expand All @@ -63,6 +65,9 @@ jobs:
echo "Removing old Docker images"
docker images --format '{{.Repository}}:{{.Tag}}' | grep '$KCR_REGISTRY/$KCR_REPOSITORY' | xargs -r docker rmi
echo "Docker login"
echo "$SK" | docker login $KCR_REGISTRY -u "$AK" --password-stdin
echo "Pulling new Docker image"
docker pull $KCR_REGISTRY/$KCR_REPOSITORY:$VERSION
Expand Down

0 comments on commit 9f5a988

Please sign in to comment.