13
13
branches : [ "main" ]
14
14
15
15
env :
16
- GO_VERSION : ~1.24
16
+ GO_VERSION : ' stable '
17
17
# Taken from https://github.com/kubernetes-sigs/kind/releases/tag/v0.18.0
18
18
# The image here should be listed under 'Images built for this release' for the version of kind in go.mod
19
19
KIND_NODE_IMAGE : " kindest/node:v1.32.0"
31
31
uses : actions/checkout@v5
32
32
33
33
- name : Install Go
34
- uses : actions/setup-go@v5
34
+ uses : actions/setup-go@v6
35
35
with :
36
36
go-version : ${{ env.GO_VERSION }}
37
37
check-latest : true
92
92
uses : actions/checkout@v5
93
93
94
94
- name : Install Go
95
- uses : actions/setup-go@v5
95
+ uses : actions/setup-go@v6
96
96
with :
97
97
go-version : ${{ env.GO_VERSION }}
98
98
check-latest : true
@@ -120,12 +120,14 @@ jobs:
120
120
permissions :
121
121
contents : ' write'
122
122
id-token : ' write'
123
+ packages : ' write'
123
124
steps :
124
125
- name : Checkout
125
126
uses : actions/checkout@v5
126
127
127
128
- name : Install Go
128
- uses : actions/setup-go@v5
129
+ id : set-go
130
+ uses : actions/setup-go@v6
129
131
with :
130
132
go-version : ${{ env.GO_VERSION }}
131
133
check-latest : true
@@ -138,6 +140,7 @@ jobs:
138
140
images : |
139
141
rabbitmqoperator/cluster-operator
140
142
quay.io/rabbitmqoperator/cluster-operator
143
+ ghcr.io/rabbitmq/cluster-operator
141
144
# generate Docker tags based on the following events/attributes
142
145
tags : |
143
146
type=sha
@@ -151,20 +154,28 @@ jobs:
151
154
uses : docker/setup-buildx-action@v3
152
155
153
156
- name : Login to Docker Hub
154
- if : github.event_name != 'pull_request'
157
+ if : ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
155
158
uses : docker/login-action@v3
156
159
with :
157
160
username : ${{ secrets.DOCKERHUB_USERNAME }}
158
161
password : ${{ secrets.DOCKERHUB_TOKEN }}
159
162
160
163
- name : Login to Quay.io
161
- if : github.event_name != 'pull_request'
164
+ if : ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
162
165
uses : docker/login-action@v3
163
166
with :
164
167
registry : quay.io
165
168
username : ${{ secrets.QUAY_USERNAME }}
166
169
password : ${{ secrets.QUAY_ROBOT_TOKEN }}
167
170
171
+ - name : Login to GHCR
172
+ if : ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
173
+ uses : docker/login-action@v3
174
+ with :
175
+ registry : ghcr.io
176
+ username : ${{ github.repository_owner }}
177
+ password : ${{ secrets.GITHUB_TOKEN }}
178
+
168
179
- name : Build and push
169
180
id : build
170
181
uses : docker/build-push-action@v6
@@ -176,8 +187,13 @@ jobs:
176
187
push : true
177
188
tags : ${{ steps.meta.outputs.tags }}
178
189
labels : ${{ steps.meta.outputs.labels }}
190
+ # FIXME: mount cache in the container
191
+ # https://github.com/reproducible-containers/buildkit-cache-dance
192
+ # https://docs.docker.com/build/ci/github-actions/cache/#cache-mounts
179
193
cache-from : type=gha
180
194
cache-to : type=gha,mode=max
195
+ build-args : |
196
+ GO_TAG=${{ steps.set-go.outputs.go-version }}
181
197
182
198
- name : Build to TAR
183
199
id : build_tar
@@ -207,8 +223,7 @@ jobs:
207
223
pushd config/installation
208
224
kustomize edit set image rabbitmqoperator/cluster-operator-dev=rabbitmqoperator/cluster-operator:"${RELEASE_VERSION}"
209
225
popd
210
- make generate-installation-manifest QUAY_IO_OPERATOR_IMAGE=quay.io/rabbitmqoperator/cluster-operator:"${RELEASE_VERSION}"
211
- echo -n "cluster-operator-${{ steps.meta.outputs.version }}.yml" > "latest-cluster-operator-dev-manifest.txt"
226
+ make generate-installation-manifest QUAY_IO_OPERATOR_IMAGE=quay.io/rabbitmqoperator/cluster-operator:"${RELEASE_VERSION}" GHCR_IO_OPERATOR_IMAGE=ghcr.io/rabbitmq/cluster-operator:"${RELEASE_VERSION}"
212
227
213
228
- name : Upload operator manifests
214
229
uses : actions/upload-artifact@v4
@@ -227,13 +242,13 @@ jobs:
227
242
rabbitmq-image :
228
243
- rabbitmq:3.13.7-management
229
244
- rabbitmq:management
230
- - pivotalrabbitmq/rabbitmq:main
245
+ - pivotalrabbitmq/rabbitmq:main-otp27
231
246
steps :
232
247
- name : Check out code into the Go module directory
233
248
uses : actions/checkout@v5
234
249
235
250
- name : Install Go
236
- uses : actions/setup-go@v5
251
+ uses : actions/setup-go@v6
237
252
with :
238
253
go-version : ${{ env.GO_VERSION }}
239
254
check-latest : true
@@ -303,7 +318,7 @@ jobs:
303
318
uses : actions/checkout@v5
304
319
305
320
- name : Install Go
306
- uses : actions/setup-go@v5
321
+ uses : actions/setup-go@v6
307
322
with :
308
323
go-version : ${{ env.GO_VERSION }}
309
324
check-latest : true
@@ -359,7 +374,7 @@ jobs:
359
374
uses : actions/checkout@v5
360
375
361
376
- name : Install Go
362
- uses : actions/setup-go@v5
377
+ uses : actions/setup-go@v6
363
378
with :
364
379
go-version : ${{ env.GO_VERSION }}
365
380
check-latest : true
@@ -418,7 +433,7 @@ jobs:
418
433
uses : actions/checkout@v5
419
434
420
435
- name : Install Go
421
- uses : actions/setup-go@v5
436
+ uses : actions/setup-go@v6
422
437
with :
423
438
go-version : ${{ env.GO_VERSION }}
424
439
check-latest : true
@@ -491,6 +506,7 @@ jobs:
491
506
files : |
492
507
cluster-operator.yml
493
508
cluster-operator-quay-io.yml
509
+ cluster-operator-ghcr-io.yml
494
510
generate_release_notes : true
495
511
draft : true
496
512
body_path : release-header.md
0 commit comments