1111 - ' hack/**'
1212 tags : [ "v*" ]
1313
14- env :
15- GO_VERSION : ' 1.23.x' # Require Go 1.23 minor
16-
1714jobs :
1815 golangci :
1916 name : Run Linter
2522 - uses : actions/setup-go@v5
2623 name : Install Go
2724 with :
28- go-version : ' stable '
25+ go-version-file : go.mod
2926
3027 - name : Run Golang Linter
3128 uses : golangci/golangci-lint-action@v6
4340 - name : Install Go
4441 uses : actions/setup-go@v5
4542 with :
46- go-version : ${{ env.GO_VERSION }}
47- check-latest : true
43+ go-version-file : go.mod
4844
4945 - name : Unit tests
5046 run : make install-tools kubebuilder-assets just-unit-tests
7672 - name : Install Go
7773 uses : actions/setup-go@v5
7874 with :
79- go-version : ${{ env.GO_VERSION }}
80- check-latest : true
75+ go-version-file : go.mod
8176
8277 - name : OCI Metadata
8378 id : meta
@@ -96,16 +91,18 @@ jobs:
9691 uses : docker/setup-buildx-action@v3
9792
9893 - name : Login to Docker Hub
94+ if : ${{ startsWith(github.ref, 'refs/tags/v') }}
9995 uses : docker/login-action@v3
10096 with :
10197 username : ${{ secrets.DOCKERHUB_USERNAME }}
10298 password : ${{ secrets.DOCKERHUB_TOKEN }}
10399
104100 - name : Build and push
101+ if : ${{ startsWith(github.ref, 'refs/tags/v') }}
105102 uses : docker/build-push-action@v6
106103 with :
107104 context : .
108- push : ${{ startsWith(github.ref, 'refs/tags/v') }}
105+ push : true
109106 platforms : linux/amd64, linux/arm64
110107 provenance : false
111108 tags : ${{ steps.meta.outputs.tags }}
@@ -152,81 +149,6 @@ jobs:
152149 retention-days : 2
153150 if-no-files-found : error
154151
155- build_operator_single_arch_amd64 :
156- name : Build single-arch AMD64 image
157- if : ${{ startsWith(github.ref, 'refs/tags/v') }}
158- runs-on : ubuntu-latest
159- needs : unit_integration_tests
160- steps :
161- - name : Checkout
162- uses : actions/checkout@v4
163-
164- - name : Login to Docker Hub
165- uses : docker/login-action@v3
166- with :
167- username : ${{ secrets.DOCKERHUB_USERNAME }}
168- password : ${{ secrets.DOCKERHUB_TOKEN }}
169-
170- - name : OCI Metadata for single-arch AMD64 image
171- id : single_arch_meta_amd64
172- uses : docker/metadata-action@v5
173- with :
174- images : |
175- rabbitmqoperator/messaging-topology-operator
176- flavor : |
177- latest=false
178- tags : |
179- type=semver,pattern={{version}},suffix=-amd64,latest=false
180-
181- - name : Build and push single-arch AMD64 image
182- uses : docker/build-push-action@v6
183- with :
184- context : .
185- platforms : linux/amd64
186- provenance : false
187- push : true
188- tags : ${{ steps.single_arch_meta_amd64.outputs.tags }}
189- labels : ${{ steps.single_arch_meta_amd64.outputs.labels }}
190-
191- build_operator_single_arch_arm64 :
192- name : Build single-arch ARM64 image
193- if : ${{ startsWith(github.ref, 'refs/tags/v') }}
194- runs-on : ubuntu-latest
195- needs : unit_integration_tests
196- steps :
197- - name : Checkout
198- uses : actions/checkout@v4
199-
200- - name : Login to Docker Hub
201- uses : docker/login-action@v3
202- with :
203- username : ${{ secrets.DOCKERHUB_USERNAME }}
204- password : ${{ secrets.DOCKERHUB_TOKEN }}
205-
206- - name : Set up QEMU
207- uses : docker/setup-qemu-action@v3
208-
209- - name : OCI Metadata for single-arch arm64 image
210- id : single_arch_meta_arm64
211- uses : docker/metadata-action@v5
212- with :
213- images : |
214- rabbitmqoperator/messaging-topology-operator
215- flavor : |
216- latest=false
217- tags : |
218- type=semver,pattern={{version}},suffix=-arm64,latest=false
219-
220- - name : Build and push single-arch arm64 image
221- uses : docker/build-push-action@v6
222- with :
223- context : .
224- platforms : linux/arm64
225- provenance : false
226- push : true
227- tags : ${{ steps.single_arch_meta_arm64.outputs.tags }}
228- labels : ${{ steps.single_arch_meta_arm64.outputs.labels }}
229-
230152 system_tests :
231153 name : Local system tests (stable k8s)
232154 runs-on : ubuntu-latest
@@ -241,8 +163,7 @@ jobs:
241163 - uses : actions/setup-go@v5
242164 name : Install Go
243165 with :
244- go-version : ${{ env.GO_VERSION }}
245- check-latest : true
166+ go-version-file : go.mod
246167
247168 - name : Get operator manifest
248169 uses : actions/download-artifact@v4
0 commit comments