|
10 | 10 | - cron: '18 2 * * *' |
11 | 11 | push: |
12 | 12 | branches: [ "main" ] |
13 | | - # Publish semver tags as releases. |
14 | | - tags: [ 'v*.*.*' ] |
15 | 13 | pull_request: |
16 | 14 | branches: [ "main" ] |
17 | 15 |
|
|
24 | 22 | build: |
25 | 23 | strategy: |
26 | 24 | 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 |
28 | 39 | runs-on: ubuntu-latest |
29 | 40 | permissions: |
30 | 41 | contents: read |
|
68 | 79 | with: |
69 | 80 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
70 | 81 | 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 }} |
73 | 85 |
|
74 | 86 | # Build and push Docker image with Buildx (don't push on PR) |
75 | 87 | # https://github.com/docker/build-push-action |
|
79 | 91 | with: |
80 | 92 | context: . |
81 | 93 | 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 }} |
83 | 97 | platforms: linux/amd64,linux/arm64 |
84 | 98 | push: ${{ github.event_name != 'pull_request' }} |
85 | 99 | tags: ${{ steps.meta.outputs.tags }} |
|
0 commit comments