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,11 +120,13 @@ jobs:
120120 permissions :
121121 contents : ' write'
122122 id-token : ' write'
123+ packages : ' write'
123124 steps :
124125 - name : Checkout
125126 uses : actions/checkout@v5
126127
127128 - name : Install Go
129+ id : set-go
128130 uses : actions/setup-go@v5
129131 with :
130132 go-version : ${{ env.GO_VERSION }}
@@ -138,6 +140,7 @@ jobs:
138140 images : |
139141 rabbitmqoperator/cluster-operator
140142 quay.io/rabbitmqoperator/cluster-operator
143+ ghcr.io/rabbitmq/cluster-operator
141144 # generate Docker tags based on the following events/attributes
142145 tags : |
143146 type=sha
@@ -151,20 +154,28 @@ jobs:
151154 uses : docker/setup-buildx-action@v3
152155
153156 - 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') }}
155158 uses : docker/login-action@v3
156159 with :
157160 username : ${{ secrets.DOCKERHUB_USERNAME }}
158161 password : ${{ secrets.DOCKERHUB_TOKEN }}
159162
160163 - 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') }}
162165 uses : docker/login-action@v3
163166 with :
164167 registry : quay.io
165168 username : ${{ secrets.QUAY_USERNAME }}
166169 password : ${{ secrets.QUAY_ROBOT_TOKEN }}
167170
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+
168179 - name : Build and push
169180 id : build
170181 uses : docker/build-push-action@v6
@@ -176,8 +187,13 @@ jobs:
176187 push : true
177188 tags : ${{ steps.meta.outputs.tags }}
178189 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
179193 cache-from : type=gha
180194 cache-to : type=gha,mode=max
195+ build-args : |
196+ GO_TAG=${{ steps.set-go.outputs.go-version }}
181197
182198 - name : Build to TAR
183199 id : build_tar
@@ -207,8 +223,7 @@ jobs:
207223 pushd config/installation
208224 kustomize edit set image rabbitmqoperator/cluster-operator-dev=rabbitmqoperator/cluster-operator:"${RELEASE_VERSION}"
209225 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}"
212227
213228 - name : Upload operator manifests
214229 uses : actions/upload-artifact@v4
@@ -227,7 +242,7 @@ jobs:
227242 rabbitmq-image :
228243 - rabbitmq:3.13.7-management
229244 - rabbitmq:management
230- - pivotalrabbitmq/rabbitmq:main
245+ - pivotalrabbitmq/rabbitmq:main-otp27
231246 steps :
232247 - name : Check out code into the Go module directory
233248 uses : actions/checkout@v5
@@ -491,6 +506,7 @@ jobs:
491506 files : |
492507 cluster-operator.yml
493508 cluster-operator-quay-io.yml
509+ cluster-operator-ghcr-io.yml
494510 generate_release_notes : true
495511 draft : true
496512 body_path : release-header.md
0 commit comments