aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-08-18 21:05:45 +0100
committerGravatar Chris Lovering <[email protected]>2022-08-18 21:05:45 +0100
commitf799cb101559202c85d0a38fba626687714e5e33 (patch)
tree2eef610572cf9fae70236470bf12ba8e956d363b
parentUpdate repo & image name (diff)
Update CI to support matrix postgres versions
-rw-r--r--.github/workflows/build.yml19
-rw-r--r--Dockerfile4
2 files changed, 10 insertions, 13 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f37ba87..5a5f88e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,6 +1,7 @@
name: Build
on:
+ workflow_dispatch:
push:
branches:
- main
@@ -11,16 +12,12 @@ concurrency:
jobs:
build:
+ strategy:
+ matrix:
+ postgres_version: [12, 13, 14]
runs-on: ubuntu-latest
steps:
- # Create a commit SHA-based tag for the container repositories
- - name: Create SHA Container Tag
- id: sha_tag
- run: |
- tag=$(cut -c 1-7 <<< $GITHUB_SHA)
- echo "::set-output name=tag::$tag"
-
- name: Checkout code
uses: actions/checkout@v2
@@ -49,11 +46,9 @@ jobs:
context: .
file: ./Dockerfile
push: true
- cache-from: type=registry,ref=ghcr.io/chrislovering/psql_extended:latest
+ cache-from: type=registry,ref=ghcr.io/chrislovering/psql_extended:${{ matrix.postgres_version }}
cache-to: type=inline
tags: |
- ghcr.io/chrislovering/psql_extended:latest
- ghcr.io/chrislovering/psql_extended:14
- ghcr.io/chrislovering/psql_extended:${{ steps.sha_tag.outputs.tag }}
+ ghcr.io/chrislovering/psql_extended:${{ matrix.postgres_version }}
build-args: |
- git_sha=${{ github.sha }}
+ postgres_version=${{ matrix.postgres_version }}
diff --git a/Dockerfile b/Dockerfile
index 40824c1..6facbd6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,6 @@
-FROM postgres:14-alpine
+ARG postgres_version=14
+
+FROM postgres:$postgres_version-alpine
ENV PG_CRON_VERSION=1.4.1 \
PG_REPACK_VERSION=1.4.7