@@ -12,7 +12,6 @@ permissions: {}
1212env :
1313 GO_VERSION : 1.26.2
1414 GHCR : ghcr.io
15- GCR : gcr.io
1615 HELM_VERSION : 3.8.2
1716
1817jobs :
5958 arch : amd64
6059 - runner : ubuntu-24.04-arm
6160 arch : arm64
62- container_registry :
63- - ghcr.io/pipe-cd
64- - gcr.io/pipecd
6561 runs-on : ${{ matrix.platform.runner }}
6662 permissions :
6763 contents : read
8278 username : ${{ github.actor }}
8379 password : ${{ secrets.GITHUB_TOKEN }}
8480
85- - name : Log in to GCR
86- uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
87- with :
88- registry : ${{ env.GCR }}
89- username : _json_key
90- password : ${{ secrets.GCR_SA }}
91-
9281 # Build and push image by digest (without tag)
9382 - name : Build and push pipedv1 experimental image (${{ matrix.platform.arch }})
9483 id : build
9786 context : .
9887 file : cmd/pipedv1/Dockerfile
9988 platforms : linux/${{ matrix.platform.arch }}
100- outputs : type=image,name=${{ matrix.container_registry }}/pipedv1-exp,push-by-digest=true,name-canonical=true,push=true
101- cache-from : type=registry,ref=${{ matrix.container_registry }}/pipedv1-exp:latest
89+ outputs : type=image,name=${{ env.GHCR }}/pipe-cd /pipedv1-exp,push-by-digest=true,name-canonical=true,push=true
90+ cache-from : type=registry,ref=${{ env.GHCR }}/pipe-cd /pipedv1-exp:latest
10291 cache-to : type=inline
10392
10493 # Export digest as artifact for merge job
@@ -111,7 +100,7 @@ jobs:
111100 - name : Upload digest
112101 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
113102 with :
114- name : digests-pipedv1-exp-${{ matrix.platform.arch }}-${{ matrix.container_registry == 'ghcr.io/pipe-cd' && 'ghcr' || 'gcr' }}
103+ name : digests-pipedv1-exp-${{ matrix.platform.arch }}
115104 path : /tmp/digests/*
116105 if-no-files-found : error
117106 retention-days : 1
@@ -123,11 +112,6 @@ jobs:
123112 permissions :
124113 contents : read
125114 packages : write
126- strategy :
127- matrix :
128- container_registry :
129- - ghcr.io/pipe-cd
130- - gcr.io/pipecd
131115 steps :
132116 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
133117 with :
@@ -137,7 +121,7 @@ jobs:
137121 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
138122 with :
139123 path : /tmp/digests
140- pattern : digests-pipedv1-exp-*-${{ matrix.container_registry == 'ghcr.io/pipe-cd' && 'ghcr' || 'gcr' }}
124+ pattern : digests-pipedv1-exp-*
141125 merge-multiple : true
142126
143127 - name : Set up Docker Buildx
@@ -151,24 +135,17 @@ jobs:
151135 username : ${{ github.actor }}
152136 password : ${{ secrets.GITHUB_TOKEN }}
153137
154- - name : Log in to GCR
155- uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
156- with :
157- registry : ${{ env.GCR }}
158- username : _json_key
159- password : ${{ secrets.GCR_SA }}
160-
161138 # Create and push multi-arch manifest
162139 - name : Create manifest list and push
163140 working-directory : /tmp/digests
164141 run : |
165142 docker buildx imagetools create \
166- -t ${{ matrix.container_registry }}/pipedv1-exp:${{ inputs.version }} \
167- $(printf '${{ matrix.container_registry }}/pipedv1-exp@sha256:%s ' *)
143+ -t ${{ env.GHCR }}/pipe-cd /pipedv1-exp:${{ inputs.version }} \
144+ $(printf '${{ env.GHCR }}/pipe-cd /pipedv1-exp@sha256:%s ' *)
168145
169146 - name : Inspect image
170147 run : |
171- docker buildx imagetools inspect ${{ matrix.container_registry }}/pipedv1-exp:${{ inputs.version }}
148+ docker buildx imagetools inspect ${{ env.GHCR }}/pipe-cd /pipedv1-exp:${{ inputs.version }}
172149
173150 image_chart :
174151 runs-on : ubuntu-24.04
0 commit comments