diff options
author | 2022-08-18 21:05:45 +0100 | |
---|---|---|
committer | 2022-08-18 21:05:45 +0100 | |
commit | f799cb101559202c85d0a38fba626687714e5e33 (patch) | |
tree | 2eef610572cf9fae70236470bf12ba8e956d363b /.github | |
parent | Update repo & image name (diff) |
Update CI to support matrix postgres versions
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 19 |
1 files changed, 7 insertions, 12 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 }} |