6
6
jobs :
7
7
build :
8
8
runs-on : ubuntu-latest
9
+ strategy :
10
+ matrix :
11
+ postgres_version : [15, 16, 17]
9
12
steps :
10
13
- name : Checkout
11
14
uses : actions/checkout@v4
@@ -29,10 +32,45 @@ jobs:
29
32
string : ${{ github.repository }}
30
33
31
34
- name : Build
32
- uses : docker/build-push-action@v5
35
+ uses : docker/build-push-action@v6
33
36
with :
34
- push : true
37
+ push : false
38
+ build-args : |
39
+ POSTGRES_VERSION=${{ matrix.postgres_version }}
40
+ tags : |
41
+ ${{ steps.name.outputs.lowercase }}:latest
42
+ ${{ steps.name.outputs.lowercase }}:${{ github.event.release.name }}-pg${{matrix.postgres_version}}
43
+ platforms : linux/amd64,linux/arm64
44
+
45
+ build-latest :
46
+ steps :
47
+ - name : Checkout
48
+ uses : actions/checkout@v4
49
+
50
+ - name : Set up QEMU
51
+ uses : docker/setup-qemu-action@v3
52
+
53
+ - name : Set up Docker Buildx
54
+ uses : docker/setup-buildx-action@v3
55
+
56
+ - name : Login to Docker Hub
57
+ uses : docker/login-action@v3
58
+ with :
59
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
60
+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
61
+
62
+ - name : Generate image identifier
63
+ id : name
64
+ uses : ASzc/change-string-case-action@v5
65
+ with :
66
+ string : ${{ github.repository }}
67
+
68
+ - name : Build
69
+ uses : docker/build-push-action@v6
70
+ with :
71
+ push : false
72
+ build-args : |
73
+ POSTGRES_VERSION=17
35
74
tags : |
36
75
${{ steps.name.outputs.lowercase }}:latest
37
- ${{ steps.name.outputs.lowercase }}:${{ github.event.release.name }}
38
76
platforms : linux/amd64,linux/arm64
0 commit comments