diff --git a/.github/workflows/DOCKER-CD-STAGING.yml b/.github/workflows/DOCKER-CD-STAGING.yml index de70500..28c0a88 100644 --- a/.github/workflows/DOCKER-CD-STAGING.yml +++ b/.github/workflows/DOCKER-CD-STAGING.yml @@ -5,8 +5,8 @@ on: jobs: ci: - # Using Environment - prod 환경 사용 - # environment: prod + # Using Environment - staging 환경 사용 + # environment: staging runs-on: ubuntu-24.04 env: working-directory: . @@ -38,7 +38,7 @@ jobs: run: | mkdir -p ./src/main/resources && cd $_ touch ./application.yml - echo "${{ secrets.YML }}" > ./application.yml + echo "${{ secrets.YML_ACTIVE_STAGING }}" > ./application.yml cat ./application.yml working-directory: ${{ env.working-directory }} @@ -46,7 +46,7 @@ jobs: run: | cd ./src/main/resources touch ./application-staging.yml - echo "${{ secrets.PROD_YML }}" > ./application-staging.yml + echo "${{ secrets.STAGING_YML }}" > ./application-staging.yml working-directory: ${{ env.working-directory }} - name: 빌드 @@ -62,8 +62,8 @@ jobs: - name: login docker hub uses: docker/login-action@v2.2.0 with: - username: ${{ secrets.STAGING_DOCKER_LOGIN_USERNAME }} - password: ${{ secrets.STAGING_DOCKER_LOGIN_ACCESSTOKEN }} + username: ${{ secrets.PROD_DOCKER_LOGIN_USERNAME }} + password: ${{ secrets.PROD_DOCKER_LOGIN_ACCESSTOKEN }} - name: docker image 빌드 및 푸시 run: | diff --git a/Dockerfile-staging b/Dockerfile-staging index 2eaf87f..0841add 100644 --- a/Dockerfile-staging +++ b/Dockerfile-staging @@ -5,7 +5,7 @@ FROM amazoncorretto:21 WORKDIR /app # Copy JAR file to the container -COPY build/libs/noostak-0.0.1-SNAPSHOT.jar /app/noostak.jar +COPY build/libs/noostak-0.0.1-SNAPSHOT.jar /app/noostak-0.0.1-SNAPSHOT.jar # Set environment variables for timezone and Spring profile ENV TZ=Asia/Seoul @@ -15,4 +15,4 @@ ENV SPRING_PROFILES_ACTIVE=staging EXPOSE 8080 # Run the application -CMD ["java", "-Duser.timezone=$TZ", "-jar", "-Dspring.profiles.active=$SPRING_PROFILES_ACTIVE", "noostak.jar"] +CMD ["java", "-Duser.timezone=$TZ", "-jar", "-Dspring.profiles.active=$SPRING_PROFILES_ACTIVE", "noostak-0.0.1-SNAPSHOT.jar"]