-
Notifications
You must be signed in to change notification settings - Fork 18
142 lines (138 loc) · 3.8 KB
/
builder-images.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
135
136
137
138
139
140
141
142
name: Trunk builder images
on:
push:
branches:
- 'main'
paths:
- "cli/images/**"
- ".github/workflows/builder-images.yml"
pull_request:
branches:
- 'main'
paths:
- "cli/images/**"
- ".github/workflows/builder-images.yml"
jobs:
build_and_push_pgrx_builders:
name: Build and push PGRX builder images
runs-on:
- self-hosted
- dind
- large-8x8
strategy:
fail-fast: false
matrix:
pg_version:
- "14"
- "15"
- "16"
pgrx_version:
- "0.7.4"
- "0.8.0"
- "0.8.3"
- "0.8.4"
- "0.9.0"
- "0.9.1"
- "0.9.7"
- "0.9.8"
- "0.10.0"
- "0.10.1"
- "0.10.2"
- "0.11.0"
- "0.11.1"
- "0.11.2"
- "0.11.3"
- "0.11.4"
- "0.12.0"
- "0.12.1"
- "0.12.2"
- "0.12.3"
- "0.12.4"
- "0.12.5"
- "0.12.6"
exclude:
- pg_version: "16"
pgrx_version: "0.7.4"
- pg_version: "16"
pgrx_version: "0.8.0"
- pg_version: "16"
pgrx_version: "0.8.3"
- pg_version: "16"
pgrx_version: "0.8.4"
- pg_version: "16"
pgrx_version: "0.9.0"
- pg_version: "16"
pgrx_version: "0.9.1"
- pg_version: "16"
pgrx_version: "0.9.7"
- pg_version: "16"
pgrx_version: "0.9.8"
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: quay.io/coredb/binfmt:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
run: |
set -xe
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [ "${BRANCH_NAME}" == "main" ]; then
PUSH_FLAG="--push"
fi
docker buildx build \
--build-arg PG_VERSION=${{ matrix.pg_version }} \
--build-arg PGRX_VERSION=${{ matrix.pgrx_version }} \
--platform linux/amd64,linux/arm64 \
--tag quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }} \
--pull ${PUSH_FLAG} cli/images/pgrx-builder
build_and_push_c_builders:
name: Build and push C builder images
runs-on:
- self-hosted
- dind
- large-8x8
strategy:
fail-fast: false
matrix:
pg_version:
- "14"
- "15"
- "16"
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: quay.io/coredb/binfmt:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
run: |
set -xe
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
PUSH_FLAG=""
if [ "${BRANCH_NAME}" == "main" ]; then
PUSH_FLAG="--push"
fi
docker buildx build \
--build-arg PG_VERSION=${{ matrix.pg_version }} \
--platform linux/amd64,linux/arm64 \
--tag quay.io/coredb/c-builder:pg${{ matrix.pg_version }} \
--pull ${PUSH_FLAG} cli/images/c-builder