@@ -2,89 +2,17 @@ name: "push images on release"
22
33env :
44 IMAGE_NAME : ghcr.io/${{ github.repository }}
5+ PLATFORMS : linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
56
67on :
78 push :
89 tags :
910 - v*
10- jobs :
11- build-and-push-amd64-ib-sriov-cni :
12- runs-on : ubuntu-24.04
13- name : image push AMD64
14- steps :
15- - name : check out the repo
16- uses : actions/checkout@v6
17-
18- - name : set up Docker Buildx
19- uses : docker/setup-buildx-action@v3
20-
21- - name : login to Docker
22- uses : docker/login-action@v3
23- with :
24- registry : ghcr.io
25- username : ${{ github.repository_owner }}
26- password : ${{ secrets.GITHUB_TOKEN }}
27-
28- - name : docker meta
29- id : docker_meta
30- uses : docker/metadata-action@v5
31- with :
32- images : ${{ env.IMAGE_NAME }}
33- flavor : |
34- latest=false
35- tags : |
36- type=ref,event=tag
37-
38- - name : build and push ib-sriov-cni
39- uses : docker/build-push-action@v6
40- with :
41- context : .
42- push : true
43- platforms : linux/amd64
44- tags : |
45- ${{ steps.docker_meta.outputs.tags }}-amd64
46- file : ./Dockerfile
4711
48- build-and-push-arm64-ib-sriov-cni :
49- runs-on : ubuntu-24.04
50- name : image push ARM64
51- steps :
52- - name : check out the repo
53- uses : actions/checkout@v6
54-
55- - name : set up Docker Buildx
56- uses : docker/setup-buildx-action@v3
57-
58- - name : login to Docker
59- uses : docker/login-action@v3
60- with :
61- registry : ghcr.io
62- username : ${{ github.repository_owner }}
63- password : ${{ secrets.GITHUB_TOKEN }}
64-
65- - name : docker meta
66- id : docker_meta
67- uses : docker/metadata-action@v5
68- with :
69- images : ${{ env.IMAGE_NAME }}
70- flavor : |
71- latest=false
72- tags : |
73- type=ref,event=tag
74-
75- - name : build and push ib-sriov-cni
76- uses : docker/build-push-action@v6
77- with :
78- context : .
79- push : true
80- platforms : linux/arm64
81- tags : |
82- ${{ steps.docker_meta.outputs.tags }}-arm64
83- file : ./Dockerfile
84-
85- build-and-push-ppc64le-ib-sriov-cni :
12+ jobs :
13+ build-and-push-ib-sriov-cni :
8614 runs-on : ubuntu-24.04
87- name : image push ppc64le
15+ name : build and push multi-arch image (Release)
8816 steps :
8917 - name : check out the repo
9018 uses : actions/checkout@v6
@@ -109,43 +37,13 @@ jobs:
10937 tags : |
11038 type=ref,event=tag
11139
112- - name : build and push ib-sriov-cni
40+ - name : build and push ib-sriov-cni (multi-arch)
11341 uses : docker/build-push-action@v6
11442 with :
11543 context : .
11644 push : true
117- platforms : linux/arm64
45+ platforms : ${{ env.PLATFORMS }}
11846 tags : |
119- ${{ steps.docker_meta.outputs.tags }}-ppc64le
47+ ${{ steps.docker_meta.outputs.tags }}
48+ labels : ${{ steps.docker_meta.outputs.labels }}
12049 file : ./Dockerfile
121-
122- push-manifest :
123- runs-on : ubuntu-24.04
124- needs : [build-and-push-amd64-ib-sriov-cni,build-and-push-arm64-ib-sriov-cni,build-and-push-ppc64le-ib-sriov-cni]
125- steps :
126- - name : set up Docker Buildx
127- uses : docker/setup-buildx-action@v3
128-
129- - name : docker meta
130- id : docker_meta
131- uses : docker/metadata-action@v5
132- with :
133- images : ${{ env.IMAGE_NAME }}
134- flavor : |
135- latest=false
136- tags : |
137- type=ref,event=tag
138-
139- - name : login to GitHub Container Registry
140- uses : docker/login-action@v3
141- with :
142- registry : ghcr.io
143- username : ${{ github.repository_owner }}
144- password : ${{ secrets.GITHUB_TOKEN }}
145-
146- - name : create manifest for multi-arch images
147- run : |
148- docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
149- ${{ steps.docker_meta.outputs.tags }}-amd64 \
150- ${{ steps.docker_meta.outputs.tags }}-arm64 \
151- ${{ steps.docker_meta.outputs.tags }}-ppc64le
0 commit comments