Skip to content

Commit

Permalink
update: app.jar파일 copy하기 위한 경로 직접 지정
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoojin-An committed Oct 1, 2023
1 parent 1b3e109 commit 073cc8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/prod-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Set artifact
run: echo "artifact=$(ls ./build/libs)" >> $GITHUB_ENV
# - name: Set artifact
# run: echo "artifact=$(ls ./build/libs)" >> $GITHUB_ENV

- name: Build, tag, and push image to Amazon ECR
id: build-image
Expand All @@ -85,7 +85,11 @@ jobs:
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
ls -al
docker build -f Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
echo artifact=$(sudo find . -name katj-0.0.1-SNAPSHOT.jar) >> $GITHUB_ENV
cp ${{env.artifact}} ./app.jar
ls -al
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
FROM eclipse-temurin:17-jdk-alpine

# 애플리케이션 JAR 파일 복사
COPY build/libs/*.jar ./app.jar
#COPY build/libs/*.jar ./app.jar

## 개발 환경 프로파일 설정
#ENV SPRING_PROFILES_ACTIVE=dev
Expand Down

0 comments on commit 073cc8e

Please sign in to comment.