From c2b8419acbba917fe3483abf28cca004408d1fbd Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 25 Oct 2023 10:42:29 +0200 Subject: [PATCH] Use PG_MAJOR version as qwc-base-db image tag version, build images for PG 13,14,15 --- .github/workflows/qwc-base-db.yml | 25 +++++++++++++++++++++++-- Dockerfile | 7 ++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/qwc-base-db.yml b/.github/workflows/qwc-base-db.yml index ff642e1..1c3260e 100644 --- a/.github/workflows/qwc-base-db.yml +++ b/.github/workflows/qwc-base-db.yml @@ -20,14 +20,35 @@ jobs: echo "tag=latest,${GITHUB_REF:10}" >>$GITHUB_OUTPUT fi - - name: Build and publish qwc-base-db docker image + - name: Build and publish qwc-base-db docker image for pg 13 uses: elgohr/Publish-Docker-Github-Action@v5 with: name: sourcepole/qwc-base-db username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - tags: "${{ steps.get_tag.outputs.tag }}" + tags: "13" + workdir: . + buildargs: PG_MAJOR=13,POSTGIS_VERSION=3 + + - name: Build and publish qwc-base-db docker image for pg 14 + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: sourcepole/qwc-base-db + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + tags: "14" + workdir: . + buildargs: PG_MAJOR=14,POSTGIS_VERSION=3 + + - name: Build and publish qwc-base-db docker image for pg 15 + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: sourcepole/qwc-base-db + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + tags: "15" workdir: . + buildargs: PG_MAJOR=15,POSTGIS_VERSION=3 - name: Build and publish qwc-base-db-migrate docker image uses: elgohr/Publish-Docker-Github-Action@v5 diff --git a/Dockerfile b/Dockerfile index f9940b4..45c891a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ # A postgres DB with the minimal QWC config DB setup -FROM postgres:15 +ARG PG_MAJOR=15 +ARG POSTGIS_VERSION=3 + +FROM postgres:${PG_MAJOR} ENV PGDATA=/var/lib/postgresql/docker ENV POSTGRES_PASSWORD= -ARG PG_MAJOR=15 -ARG POSTGIS_VERSION=3 # Install postgis RUN \