Skip to content

Commit 0cd0769

Browse files
Morl99jschirrmacher
authored andcommitted
Add multiple docker tags for different partman major versions and build major versions 4 and 5 consecutively
1 parent f071d8d commit 0cd0769

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

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

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
- cron: '18 2 * * *'
1111
push:
1212
branches: [ "main" ]
13-
# Publish semver tags as releases.
14-
tags: [ 'v*.*.*' ]
1513
pull_request:
1614
branches: [ "main" ]
1715

@@ -24,7 +22,20 @@ jobs:
2422
build:
2523
strategy:
2624
matrix:
27-
version: [13, 14, 15, 16]
25+
postgres_version: [13, 14, 15, 16]
26+
major: [4,5]
27+
include:
28+
- partman_version: v4.7.4
29+
partman_checksum: 28e4fdb83ecc16525959ae9593bfbfd077db429285f5f7d8e2468bfff6cbdbf2c81ace79a9ddeb4f00f51eb709163dbd713fe6b221a432ac2ff766f98d4cf8e4
30+
default: "true"
31+
major: 4
32+
- partman_version: v5.0.0
33+
partman_checksum: 7a1b41732eb063a94cee7a589a252055e3a33ccf0ddfe5cddba22978ffd306cf263312b172355c930d355aea0f5f5530fd2344520791df9cb05a38614c521f9f
34+
default: "false"
35+
major: 5
36+
exclude:
37+
- major: 5
38+
postgres_version: 13 # partman 5.x does not support postgres 13
2839
runs-on: ubuntu-latest
2940
permissions:
3041
contents: read
@@ -68,8 +79,9 @@ jobs:
6879
with:
6980
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7081
tags: |
71-
type=raw,value=latest,enable=${{ matrix.version == '15'}}
72-
${{ matrix.version }}
82+
type=raw,value=latest,enable=${{ matrix.postgres_version == '15' && matrix.default == 'true' }}
83+
type=raw,value=${{ matrix.postgres_version }},enable=${{ matrix.default == 'true'}}
84+
${{ matrix.postgres_version }}-${{ matrix.major }}
7385
7486
# Build and push Docker image with Buildx (don't push on PR)
7587
# https://github.com/docker/build-push-action
@@ -79,7 +91,9 @@ jobs:
7991
with:
8092
context: .
8193
build-args: |
82-
POSTGRESQL_VERSION=${{ matrix.version }}
94+
POSTGRESQL_VERSION=${{ matrix.postgres_version }}
95+
PARTMAN_VERSION=${{ matrix.partman_version }}
96+
PARTMAN_CHECKSUM=${{ matrix.partman_checksum }}
8397
platforms: linux/amd64,linux/arm64
8498
push: ${{ github.event_name != 'pull_request' }}
8599
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)