From 6a9c3c57cbafdc16d9826c959aeb36bb555ab14b Mon Sep 17 00:00:00 2001 From: PokingTeemo <110599863+PokingTeemo@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:18:32 +0900 Subject: [PATCH] =?UTF-8?q?bug:=20working=20=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle-publish.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 02f52af..b609dc7 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -38,21 +38,25 @@ jobs: # 환경별 application.yml 파일 생성 - name: Create application.yml files run: | - mkdir -p $WORKING_DIRECTORY/src/main/resources/ - echo "${{ secrets.APPLICATION_DEFAULT }}" > $WORKING_DIRECTORY/src/main/resources/application.yml - echo "${{ secrets.APPLICATION_DEV }}" > $WORKING_DIRECTORY/src/main/resources/application-dev.yml - echo "${{ secrets.APPLICATION_LOCAL }}" > $WORKING_DIRECTORY/src/main/resources/application-local.yml - echo "${{ secrets.APPLICATION_PROD }}" > $WORKING_DIRECTORY/src/main/resources/application-prod.yml + mkdir -p mkdir -p backend/src/main/resources/ + echo "${{ secrets.APPLICATION_DEFAULT }}" > backend/src/main/resources/application.yml + echo "${{ secrets.APPLICATION_DEV }}" > backend/src/main/resources/application-dev.yml + echo "${{ secrets.APPLICATION_LOCAL }}" > backend/src/main/resources/application-local.yml + echo "${{ secrets.APPLICATION_PROD }}" > backend/src/main/resources/application-prod.yml # Gradle 실행 권한 설정 - name: Grant execute permission to gradlew run: chmod +x gradlew working-directory: $WORKING_DIRECTORY - # Gradle 빌드 및 테스트 실행 + # Gradle 빌드 - name: Build and Test with Gradle run: ./gradlew clean build working-directory: $WORKING_DIRECTORY + env: + SPRING_DATASOURCE_URL: jdbc:mysql://aimodb.cbimeayem48r.ap-northeast-2.rds.amazonaws.com:3306/aimo + SPRING_DATASOURCE_USERNAME: admin + SPRING_DATASOURCE_PASSWORD: ${{ secrets.DB_PASSWORD }} # 빌드된 JAR 파일을 EC2_HOST_1로 복사 - name: Copy JAR file to EC2_HOST_1