77env :
88 REGISTRY : ghcr.io
99 IMAGE_NAME : ${{ github.repository }}
10- GO_VERSION : ' 1.24 '
10+ GO_VERSION : ' 1.25 '
1111
1212jobs :
13- manager -image :
14- name : Build and push manager image
13+ build -image :
14+ name : Build and push image
1515 runs-on : ubuntu-latest
1616 steps :
1717 - name : Checkout code
@@ -22,63 +22,21 @@ jobs:
2222 go-version : " ${{ env.GO_VERSION }}"
2323 cache : true
2424
25- - name : Set up QEMU
26- uses : docker/setup-qemu-action@v3
27-
28- - name : Set up Docker Buildx
29- uses : docker/setup-buildx-action@v3
30-
31- - name : Cache Docker layers
32- uses : actions/cache@v4
33- with :
34- path : /tmp/.buildx-cache
35- key : ${{ runner.os }}-buildx-manager-${{ github.sha }}
36- restore-keys : |
37- ${{ runner.os }}-buildx-manager-
38- ${{ runner.os }}-buildx-
39-
40- - name : Docker manager metadata
41- id : meta
42- uses : docker/metadata-action@v5
43- with :
44- github-token : ${{ secrets.GITHUB_TOKEN }}
45- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46- flavor : latest=false
47- tags : type=ref,event=tag
48-
4925 - name : Log in to the Container registry
5026 uses : docker/login-action@v3
5127 with :
5228 registry : ${{ env.REGISTRY }}
5329 username : ${{ github.actor }}
5430 password : ${{ secrets.GITHUB_TOKEN }}
5531
56- - name : Build and push manager image
57- uses : docker/build-push-action@v6
58- with :
59- context : .
60- push : true
61- build-args : |
62- LDFLAGS=${{ env.DOCKER_BUILD_LDFLAGS }}
63- tags : ${{ steps.meta.outputs.tags }}
64- labels : ${{ steps.meta.outputs.labels }}
65- platforms : linux/amd64,linux/arm64
66- cache-from : type=local,src=/tmp/.buildx-cache
67- cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
68-
69- - name : Move cache
70- # Temp fix
71- # https://github.com/docker/build-push-action/issues/252
72- # https://github.com/moby/buildkit/issues/1896
73- run : |
74- rm -rf /tmp/.buildx-cache
75- mv /tmp/.buildx-cache-new /tmp/.buildx-cache
32+ - name : Build and push image
33+ run : make image-build-push
7634
7735 release :
7836 name : Release
7937 runs-on : ubuntu-latest
8038 needs :
81- - manager -image
39+ - build -image
8240 steps :
8341 - uses : actions/checkout@v5
8442
8745 go-version : " ${{ env.GO_VERSION }}"
8846 cache : true
8947
90- - uses : actions/cache@v4
91- with :
92- path : bin
93- key : ${{ runner.os }}-tools-bin-release-${{ hashFiles('Makefile') }}
94- restore-keys : |
95- ${{ runner.os }}-tools-bin-release-
96- ${{ runner.os }}-tools-bin-
97-
98- - name : Docker manager metadata
99- id : meta
100- uses : docker/metadata-action@v5
101- with :
102- github-token : ${{ secrets.GITHUB_TOKEN }}
103- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
104- flavor : latest=false
105- tags : type=ref,event=tag
106-
10748 - name : manifest
10849 run : make release
10950
0 commit comments