-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (32 loc) · 1.3 KB
/
backend_dev_flyway.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: dev flyway 검증
on:
pull_request:
types: [opened, reopened, synchronize]
branches: [ develop-be ]
permissions: write-all
jobs:
SSH:
if: contains(github.event.pull_request.labels.*.name, 'backend')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run scripts in server
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.dev_ip }}
username: ${{ secrets.dev_user }}
key: ${{ secrets.dev_private_key }}
script: |
cd ${{ secrets.dev_project_directory }}
- name: Create flyway.conf
run: |
touch flyway.conf
echo "flyway.driver=${{ secrets.dev_datasource_driver_class_name }}" >> flyway.conf
echo "flyway.url=${{ secrets.dev_datasource_url }}" >> flyway.conf
echo "flyway.user=${{ secrets.dev_datasource_username }}" >> flyway.conf
echo "flyway.password=${{ secrets.dev_datasource_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
- name: flywayValidate
run: ./gradlew -Dflyway.configFiles=flyway.conf flywayValidate --stacktrace