From d13aba64c249be4139f4d43e7f5697410bc1a79d 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 | 6 +++--- 2 files changed, 26 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..c7b92b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ # A postgres DB with the minimal QWC config DB setup -FROM postgres:15 +ARG PG_MAJOR=15 +FROM postgres:${PG_MAJOR} +ARG POSTGIS_VERSION=3 ENV PGDATA=/var/lib/postgresql/docker ENV POSTGRES_PASSWORD= -ARG PG_MAJOR=15 -ARG POSTGIS_VERSION=3 # Install postgis RUN \