@@ -18,63 +18,65 @@ jobs:
18
18
- linux/amd64
19
19
- linux/arm64
20
20
steps :
21
- - name : Prepare
22
- run : |
23
- platform=${{ matrix.platform }}
24
- echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
25
-
26
- - name : change kmesh version
27
- if : github.ref_name != 'main'
28
- env :
29
- VERSION : ${{ github.ref_name }}
30
- run : make update-version UPDATE_VERSION=${{ github.ref_name }}
21
+ - uses : actions/checkout@v4
22
+
23
+ - name : Prepare
24
+ run : |
25
+ platform=${{ matrix.platform }}
26
+ echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
27
+
28
+ - name : change kmesh version
29
+ if : github.ref_name != 'main'
30
+ env :
31
+ VERSION : ${{ github.ref_name }}
32
+ run : make update-version UPDATE_VERSION=${{ github.ref_name }}
31
33
32
- - name : Docker meta
33
- id : meta
34
- uses : docker/metadata-action@v5
35
- with :
36
- images : ${{ env.REGISTRY_IMAGE }}
37
- # generate Docker tags based on the following events/attributes
38
- tags : |
39
- type=ref,event=tag
40
- type=semver,pattern={{version}}
41
- type=raw,value=latest,enable={{is_default_branch}}
42
- - name : Set up QEMU
43
- uses : docker/setup-qemu-action@v3
34
+ - name : Docker meta
35
+ id : meta
36
+ uses : docker/metadata-action@v5
37
+ with :
38
+ images : ${{ env.REGISTRY_IMAGE }}
39
+ # generate Docker tags based on the following events/attributes
40
+ tags : |
41
+ type=ref,event=tag
42
+ type=semver,pattern={{version}}
43
+ type=raw,value=latest,enable={{is_default_branch}}
44
+ - name : Set up QEMU
45
+ uses : docker/setup-qemu-action@v3
44
46
45
- - name : Set up Docker Buildx
46
- uses : docker/setup-buildx-action@v3
47
+ - name : Set up Docker Buildx
48
+ uses : docker/setup-buildx-action@v3
47
49
48
- - name : Login to Github Container Registry
49
- run : echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u $ --password-stdin
50
+ - name : Login to Github Container Registry
51
+ run : echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u $ --password-stdin
50
52
51
- - name : Checkout code
52
- uses : actions/checkout@v3
53
+ - name : Checkout code
54
+ uses : actions/checkout@v3
53
55
54
- - name : Build and Push by digest
55
- id : build
56
- uses : docker/build-push-action@v6
57
- with :
58
- context : .
59
- platforms : ${{ matrix.platform }}
60
- labels : ${{ steps.meta.outputs.labels }}
61
- file : build/docker/github.dockerfile
62
- tags : ${{ steps.meta.outputs.tags }}
63
- outputs : type=image,name=${{ env.REGISTRY_IMAGE }},name-canonical=true,push=true
56
+ - name : Build and Push by digest
57
+ id : build
58
+ uses : docker/build-push-action@v6
59
+ with :
60
+ context : .
61
+ platforms : ${{ matrix.platform }}
62
+ labels : ${{ steps.meta.outputs.labels }}
63
+ file : build/docker/github.dockerfile
64
+ tags : ${{ steps.meta.outputs.tags }}
65
+ outputs : type=image,name=${{ env.REGISTRY_IMAGE }},name-canonical=true,push=true
64
66
65
- - name : Export digest
66
- run : |
67
- mkdir -p /tmp/digests
68
- digest="${{ steps.build.outputs.digest }}"
69
- touch "/tmp/digests/${digest#sha256:}"
67
+ - name : Export digest
68
+ run : |
69
+ mkdir -p /tmp/digests
70
+ digest="${{ steps.build.outputs.digest }}"
71
+ touch "/tmp/digests/${digest#sha256:}"
70
72
71
- - name : Upload digest
72
- uses : actions/upload-artifact@v4
73
- with :
74
- name : digests-${{ env.PLATFORM_PAIR }}
75
- path : /tmp/digests/*
76
- if-no-files-found : error
77
- retention-days : 1
73
+ - name : Upload digest
74
+ uses : actions/upload-artifact@v4
75
+ with :
76
+ name : digests-${{ env.PLATFORM_PAIR }}
77
+ path : /tmp/digests/*
78
+ if-no-files-found : error
79
+ retention-days : 1
78
80
79
81
merge :
80
82
runs-on : ubuntu-latest
0 commit comments