Skip to content

Commit 4e6fd4a

Browse files
committed
fix: use PR image for test initialization and verification
- Push PR images to registry for testing - Use built PR image instead of official postgres images for test setup
1 parent f04c35f commit 4e6fd4a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
context: .
5757
platforms: linux/amd64,linux/arm64
58-
push: ${{ github.event_name != 'pull_request' }}
58+
push: true
5959
tags: ${{ steps.meta.outputs.tags }}
6060
labels: ${{ steps.meta.outputs.labels }}
6161
cache-from: |
@@ -130,7 +130,8 @@ jobs:
130130
-v $PWD/test-data/${{ matrix.test.from }}:/var/lib/postgresql/data \
131131
-e POSTGRES_PASSWORD=testpass \
132132
-e POSTGRES_DB=testdb \
133-
postgres:${{ matrix.test.from }}-bookworm \
133+
-e PG_VERSION=${{ matrix.test.from }} \
134+
${{ env.TEST_IMAGE }} \
134135
bash -c "
135136
set -e
136137
set -o pipefail
@@ -201,7 +202,8 @@ jobs:
201202
cat <<'EOF' | docker run --rm -i \
202203
-v $PWD/test-data/${{ matrix.test.from }}:/var/lib/postgresql/data \
203204
-e POSTGRES_PASSWORD=testpass \
204-
postgres:${{ matrix.test.to }}-bookworm \
205+
-e PG_VERSION=${{ matrix.test.to }} \
206+
${{ env.TEST_IMAGE }} \
205207
bash -c "
206208
docker-entrypoint.sh postgres &
207209
PGPID=\$!

0 commit comments

Comments
 (0)