Skip to content

Commit

Permalink
Merge pull request #563 from PAWECOGmbH/development
Browse files Browse the repository at this point in the history
Test Flyway 4
  • Loading branch information
ptruessel authored Nov 21, 2024
2 parents 3c2ce63 + 1b9d65e commit 60b1eb4
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,34 @@ jobs:
remote_key: ${{ secrets.STAGING_KEY }}
remote_key_pass: ${{ secrets.STAGING_KEY_PASS }}

- name: Run Flyway migrations for core
- name: Run Flyway Migrations core
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.STAGING_USER }}
key: ${{ secrets.STAGING_KEY }}
passphrase: ${{ secrets.STAGING_KEY_PASS }}
script: |
export FLYWAY_DB_FOLDER=core
docker compose run --rm flyway || exit 1
docker run --rm \
--network npm_network \
--volume ./config/db/core:/flyway/core:ro \
-e FLYWAY_URL="${{ secrets.STAGING_DB_URL }}" \
-e FLYWAY_USER="${{ secrets.STAGING_DB_USER }}" \
-e FLYWAY_PASSWORD="${{ secrets.STAGING_DB_PASSWORD }}" \
flyway/flyway -locations=filesystem:/flyway/core -table=flyway_core migrate
- name: Run Flyway migrations for myapp
- name: Run Flyway Migrations myapp
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.STAGING_USER }}
key: ${{ secrets.STAGING_KEY }}
passphrase: ${{ secrets.STAGING_KEY_PASS }}
script: |
export FLYWAY_DB_FOLDER=myapp
docker compose run --rm flyway || exit 1
docker run --rm \
--network npm_network \
--volume ./config/db/myapp:/flyway/myapp:ro \
-e FLYWAY_URL="${{ secrets.STAGING_DB_URL }}" \
-e FLYWAY_USER="${{ secrets.STAGING_DB_USER }}" \
-e FLYWAY_PASSWORD="${{ secrets.STAGING_DB_PASSWORD }}" \
flyway/flyway -locations=filesystem:/flyway/myapp -table=flyway_myapp migrate

0 comments on commit 60b1eb4

Please sign in to comment.