fix: gh-action db 2
This commit is contained in:
parent
71b9ddf720
commit
e98f259997
1 changed files with 9 additions and 1 deletions
10
.github/workflows/docker-image.yml
vendored
10
.github/workflows/docker-image.yml
vendored
|
|
@ -60,13 +60,21 @@ jobs:
|
||||||
type=sha,prefix={{branch}}-
|
type=sha,prefix={{branch}}-
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
- name: Wait for PostgreSQL
|
||||||
|
run: |
|
||||||
|
until pg_isready -h localhost -p 5432 -U postgres; do
|
||||||
|
echo "Waiting for postgres..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
- name: Build and publish Docker image
|
- name: Build and publish Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
network: host
|
||||||
build-args: |
|
build-args: |
|
||||||
DB_URL=jdbc:postgresql://postgres:5445/homepage
|
DB_URL=jdbc:postgresql://localhost:5445/homepage
|
||||||
DB_USERNAME=postgres
|
DB_USERNAME=postgres
|
||||||
DB_PASSWORD=postgres
|
DB_PASSWORD=postgres
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue