From 16ba4a998d387b83ae42036740acb70ec1f69dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=9C=EC=9D=B4=EB=AF=B8?= <63184334+JJ503@users.noreply.github.com> Date: Thu, 2 Nov 2023 05:34:37 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20flyway=20=EA=B2=80=EC=A6=9D=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend_dev_flyway.yml | 42 ++++++++++-------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/backend_dev_flyway.yml b/.github/workflows/backend_dev_flyway.yml index ddf11c1bd..94e440d07 100644 --- a/.github/workflows/backend_dev_flyway.yml +++ b/.github/workflows/backend_dev_flyway.yml @@ -44,31 +44,23 @@ jobs: sleep 1 done echo "$DATABASE_URL" + + - name: Create flyway.conf + run: | + touch flyway.conf + echo "flyway.driver=com.mysql.cj.jdbc.Driver" >> flyway.conf + echo "flyway.url=mysql://127.0.0.1:7777/testdb" >> flyway.conf + echo "flyway.user=test" >> flyway.conf + echo "flyway.password=password" >> flyway.conf + echo "flyway.encoding=UTF-8" >> flyway.conf + echo "flyway.locations=filesystem:src/main/resources/db/migration" >> flyway.conf + echo "flyway.validateOnMigrate=true" >> flyway.conf + working-directory: ./backend/ddang + + - name: flywayValidate + run: | + ./gradlew -Dflyway.configFiles=flyway.conf flywayMigrate --stacktrace + working-directory: ./backend/ddang - name: Shut down Docker Compose run: docker-compose -f .github/docker-compose.yml down - - - # - name: Set up Docker Compose - # run: docker-compose -f .github/workflows/docker-compose.yml up -d - - # - name: Create flyway.conf - # run: | - # touch flyway.conf - # echo "flyway.driver=com.mysql.cj.jdbc.Driver" >> flyway.conf - # echo "flyway.url=jdbc:mysql://127.0.0.1:7777/testdb" >> flyway.conf - # echo "flyway.user=test" >> flyway.conf - # echo "flyway.password=password" >> flyway.conf - # echo "flyway.encoding=UTF-8" >> flyway.conf - # echo "flyway.locations=filesystem:src/main/resources/db/migration" >> flyway.conf - # echo "flyway.validateOnMigrate=true" >> flyway.conf - # working-directory: ./backend/ddang - - # - name: flywayValidate - # run: | - # ./gradlew -Dflyway.configFiles=flyway.conf flywayMigrate --stacktrace - # working-directory: ./backend/ddang - - # - name: Stop MySQL - # run: docker stop mysql -