-
Notifications
You must be signed in to change notification settings - Fork 217
134 lines (132 loc) · 5.63 KB
/
build-and-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build and push images to Quay.io registry
on:
push:
branches:
- master
schedule:
- cron: '0 1 * * 3'
jobs:
build-and-push:
if: github.repository_owner == 'sclorg'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: "13/Dockerfile.c9s"
registry_namespace: "sclorg"
tag: "c9s"
image_name: "postgresql-13-c9s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
docker_context: 13
- dockerfile: "15/Dockerfile.c9s"
registry_namespace: "sclorg"
tag: "c9s"
image_name: "postgresql-15-c9s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
docker_context: 15
- dockerfile: "16/Dockerfile.c9s"
registry_namespace: "sclorg"
tag: "c9s"
image_name: "postgresql-16-c9s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
docker_context: 16
- dockerfile: "16/Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
image_name: "postgresql-16-c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
docker_context: 16
- dockerfile: "10/Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
image_name: "postgresql-10-c8s"
docker_context: 10
- dockerfile: "12/Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
image_name: "postgresql-12-c8s"
docker_context: 12
- dockerfile: "13/Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
image_name: "postgresql-13-c8s"
docker_context: 13
- dockerfile: "15/Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
image_name: "postgresql-15-c8s"
docker_context: 15
- dockerfile: "12/Dockerfile.fedora"
registry_namespace: "fedora"
tag: "12"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "postgresql-12"
docker_context: 12
- dockerfile: "13/Dockerfile.fedora"
registry_namespace: "fedora"
tag: "13"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "postgresql-13"
docker_context: 13
- dockerfile: "14/Dockerfile.fedora"
registry_namespace: "fedora"
tag: "14"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "postgresql-14"
docker_context: 14
- dockerfile: "15/Dockerfile.fedora"
registry_namespace: "fedora"
tag: "15"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "postgresql-15"
docker_context: 15
- dockerfile: "16/Dockerfile.fedora"
registry_namespace: "fedora"
tag: "16"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "postgresql-16"
docker_context: 16
steps:
- name: check if Dockerfile is c9s, then Build multi arch image and push to quay.io registry
if: matrix.dockerfile == '13/Dockerfile.c9s' || matrix.dockerfile == '15/Dockerfile.c9s' || matrix.dockerfile == '16/Dockerfile.c9s'
uses: sclorg/build-and-push-action@v4
with:
registry: "quay.io"
registry_namespace: ${{ matrix.registry_namespace }}
registry_username: ${{ secrets[matrix.quayio_username] }}
registry_token: ${{ secrets[matrix.quayio_token] }}
dockerfile: ${{ matrix.dockerfile }}
docker_context: ${{ matrix.docker_context }}
tag: ${{ matrix.tag }}
image_name: ${{ matrix.image_name }}
archs: amd64, s390x, ppc64le, arm64
- name: Check if Dockerfile is not c9s, then Build and push to quay.io registry
if: matrix.dockerfile != '13/Dockerfile.c9s' && matrix.dockerfile != '15/Dockerfile.c9s' && matrix.dockerfile != '16/Dockerfile.c9s'
uses: sclorg/build-and-push-action@v4
with:
registry: "quay.io"
registry_namespace: ${{ matrix.registry_namespace }}
registry_username: ${{ secrets[matrix.quayio_username] }}
registry_token: ${{ secrets[matrix.quayio_token] }}
dockerfile: ${{ matrix.dockerfile }}
docker_context: ${{ matrix.docker_context }}
tag: ${{ matrix.tag }}
image_name: ${{ matrix.image_name }}