Skip to content

Commit

Permalink
Update check-migrations.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
root691 authored Nov 27, 2023
1 parent ba79f4e commit b577761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
uses: actions/[email protected]

- name: Run PostgreSQL service
run: docker run --rm --name postgresql -p 5432:5432 -e POSTGRES_DB=${{env.POSTGRESQL_DB}} -e POSTGRES_HOST_AUTH_METHOD=true --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 -d ${{env.POSTGRESQL_IMAGE}}
run: docker run --rm --name postgresql -p 5432:5432 -e POSTGRES_DB=${{env.POSTGRESQL_DB}} -e POSTGRES_HOST_AUTH_METHOD=trust --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 -d ${{env.POSTGRESQL_IMAGE}}

- name: Wait for PostgreSQL run and headlthy
run: until docker inspect --format "{{json .State.Health.Status }}" postgresql|grep -m 1 "healthy"; do sleep 5 ; done
run: until docker inspect --format "{{json .State.Health.Status }}" postgresql | grep -m 1 "healthy"; do sleep 5; done

- name: Run migrations
run: docker run --rm -v "$(pwd)/${{env.MIGRATIONS_FOLDER}}":/app --network "host" ${{env.LIQUIBASE_IMAGE}} update --changelog-file=/app/${{env.LIQUIBASE_CHANGELOG_FILE}} --url=jdbc:postgresql://${{env.DOCKER_LOCALHOST}}:5432/${{env.POSTGRESQL_DB}}

0 comments on commit b577761

Please sign in to comment.