fix: gh-action db 4
This commit is contained in:
parent
53f9325b63
commit
f7faa37beb
1 changed files with 8 additions and 8 deletions
16
.github/workflows/docker-image.yml
vendored
16
.github/workflows/docker-image.yml
vendored
|
|
@ -60,21 +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
|
- name: Create Docker network
|
||||||
run: |
|
run: docker network create homepagenetwork || true
|
||||||
until pg_isready -h localhost -p 5445 -U postgres; do
|
|
||||||
echo "Waiting for postgres..."
|
- name: Connect services to network
|
||||||
sleep 2
|
run: docker network connect homepagenetwork postgres 2>/dev/null || true
|
||||||
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
|
network: homepagenetwork
|
||||||
build-args: |
|
build-args: |
|
||||||
DB_URL=jdbc:postgresql://localhost:5445/homepage
|
DB_URL=jdbc:postgresql://postgres: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