1313 branches : [ "main" ]
1414
1515env :
16- GO_VERSION : ~1.24
16+ GO_VERSION : ' stable '
1717 # Taken from https://github.com/kubernetes-sigs/kind/releases/tag/v0.18.0
1818 # The image here should be listed under 'Images built for this release' for the version of kind in go.mod
1919 KIND_NODE_IMAGE : " kindest/node:v1.32.0"
@@ -120,6 +120,7 @@ jobs:
120120 permissions :
121121 contents : ' write'
122122 id-token : ' write'
123+ packages : ' write'
123124 steps :
124125 - name : Checkout
125126 uses : actions/checkout@v5
@@ -138,6 +139,7 @@ jobs:
138139 images : |
139140 rabbitmqoperator/cluster-operator
140141 quay.io/rabbitmqoperator/cluster-operator
142+ ghcr.io/rabbitmq/cluster-operator
141143 # generate Docker tags based on the following events/attributes
142144 tags : |
143145 type=sha
@@ -151,20 +153,28 @@ jobs:
151153 uses : docker/setup-buildx-action@v3
152154
153155 - name : Login to Docker Hub
154- if : github.event_name != 'pull_request'
156+ if : ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
155157 uses : docker/login-action@v3
156158 with :
157159 username : ${{ secrets.DOCKERHUB_USERNAME }}
158160 password : ${{ secrets.DOCKERHUB_TOKEN }}
159161
160162 - name : Login to Quay.io
161- if : github.event_name != 'pull_request'
163+ if : ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
162164 uses : docker/login-action@v3
163165 with :
164166 registry : quay.io
165167 username : ${{ secrets.QUAY_USERNAME }}
166168 password : ${{ secrets.QUAY_ROBOT_TOKEN }}
167169
170+ - name : Login to GHCR
171+ if : ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
172+ uses : docker/login-action@v3
173+ with :
174+ registry : ghcr.io
175+ username : ${{ github.repository_owner }}
176+ password : ${{ secrets.GITHUB_TOKEN }}
177+
168178 - name : Build and push
169179 id : build
170180 uses : docker/build-push-action@v6
@@ -176,6 +186,9 @@ jobs:
176186 push : true
177187 tags : ${{ steps.meta.outputs.tags }}
178188 labels : ${{ steps.meta.outputs.labels }}
189+ # FIXME: mount cache in the container
190+ # https://github.com/reproducible-containers/buildkit-cache-dance
191+ # https://docs.docker.com/build/ci/github-actions/cache/#cache-mounts
179192 cache-from : type=gha
180193 cache-to : type=gha,mode=max
181194
@@ -207,8 +220,7 @@ jobs:
207220 pushd config/installation
208221 kustomize edit set image rabbitmqoperator/cluster-operator-dev=rabbitmqoperator/cluster-operator:"${RELEASE_VERSION}"
209222 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"
223+ 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}"
212224
213225 - name : Upload operator manifests
214226 uses : actions/upload-artifact@v4
@@ -227,7 +239,7 @@ jobs:
227239 rabbitmq-image :
228240 - rabbitmq:3.13.7-management
229241 - rabbitmq:management
230- - pivotalrabbitmq/rabbitmq:main
242+ - pivotalrabbitmq/rabbitmq:main-otp27
231243 steps :
232244 - name : Check out code into the Go module directory
233245 uses : actions/checkout@v5
@@ -491,6 +503,7 @@ jobs:
491503 files : |
492504 cluster-operator.yml
493505 cluster-operator-quay-io.yml
506+ cluster-operator-ghcr-io.yml
494507 generate_release_notes : true
495508 draft : true
496509 body_path : release-header.md
0 commit comments