-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 배포 스크립트에 flyway 커맨드 전 JDK 설정 추가
- Loading branch information
1 parent
5e9ce84
commit 35b54c4
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,30 @@ jobs: | |
source: ./manifest/spring-redis.yml | ||
target: ~/spring-redis | ||
|
||
- uses: actions/checkout@v3 # repo에 있는 파일들 self-host 머신에 복제 | ||
- name: Set up JDK 17 # jdk 셋업 17로 해야되나?? | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
check-latest: true | ||
|
||
- name: Setup Build with Gradle # gradle 셋업 | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: current | ||
arguments: build # Gradle의 'build' 태스크를 실행 | ||
|
||
# Flyway를 사용하여 데이터베이스 스키마 변경을 적용 | ||
- name: Run Database Migration # 새로운 마이그레이션 스크립트를 실행 | ||
run: ./gradlew flywayMigrate | ||
env: | ||
SPRING_PROFILES_ACTIVE: cd | ||
DB_HOST: ${{ secrets.DB_HOST }} | ||
DB_USERNAME: root | ||
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
DB_URL: jdbc:mysql://${{ secrets.DB_HOST }}:3306/teampu | ||
|
||
- name: Connect to GCP with SSH | ||
uses: appleboy/[email protected] | ||
with: | ||
|