@@ -132,6 +132,22 @@ jobs:
132132 - name: Build
133133 run: task build
134134{{- end }}
135+ - name: Set up QEMU
136+ uses: docker/setup-qemu-action@v3
137+ with :
138+ platforms: all
139+
140+ - name: Set up Docker Buildx
141+ uses: docker/setup-buildx-action@v3
142+ with :
143+ version: latest
144+
145+ - name: Log in to GitHub Container Registry
146+ uses: docker/login-action@v3
147+ with :
148+ registry: ghcr.io
149+ username: $ {{` {{ github.actor }}` }}
150+ password: $ {{` {{ secrets.GITHUB_TOKEN }}` }}
135151
136152 - name: Set up Node.js for semantic-release
137153 uses: actions/setup-node@v4.4.0
@@ -157,6 +173,7 @@ jobs:
157173{{- else }}
158174 GITHUB_TOKEN: $ {{` {{ secrets.GITHUB_TOKEN }}` }}
159175{{- end }}
176+ GITHUB_REPOSITORY: $ {{` {{ github.repository }}` }}
160177 run: |
161178 # Create first release if not exists - Initial Release Version 0.1.0
162179 if ! gh release view v0.1.0 >/dev/null 2>&1; then
@@ -191,59 +208,6 @@ jobs:
191208 echo " Release failed"
192209 exit 1
193210 fi
194-
195- build_and_push_image:
196- name: Build and Push Container Image
197- runs-on: ubuntu-24.04
198- needs: release
199- if : needs.release.outputs.new_release_published == 'true'
200- steps:
201- - name: Checkout code
202- uses: actions/checkout@v4.2.2
203- with :
204- ref: $ {{` {{ github.ref }}` }}
205- fetch-depth: 0
206-
207- - name: Set up QEMU
208- uses: docker/setup-qemu-action@v3
209- with :
210- platforms: all
211-
212- - name: Set up Docker Buildx
213- uses: docker/setup-buildx-action@v3
214- with :
215- version: latest
216-
217- - name: Log in to GitHub Container Registry
218- uses: docker/login-action@v3
219- with :
220- registry: ghcr.io
221- username: $ {{` {{ github.actor }}` }}
222- password: $ {{` {{ secrets.GITHUB_TOKEN }}` }}
223-
224- - name: Extract metadata
225- id: meta
226- uses: docker/metadata-action@v5
227- with :
228- images: ghcr.io /$ {{` {{ github.repository_owner }}` }}/$ {{` {{ github.event.repository.name }}` }}
229- tags: |
230- type= ref,event= branch
231- type= ref,event= pr
232- type= semver,pattern= {{` {{version}}` }},value= $ {{` {{ needs.release.outputs.new_release_version }}` }}
233- type= semver,pattern= {{` {{major}}.{{minor}}` }},value= $ {{` {{ needs.release.outputs.new_release_version }}` }}
234- type= raw,value= latest
235-
236- - name: Build and push Docker image
237- uses: docker/build-push-action@v6
238- with :
239- context: .
240- platforms: linux/amd64,linux/arm64
241- push: true
242- tags: $ {{` {{ steps.meta.outputs.tags }}` }}
243- labels: $ {{` {{ steps.meta.outputs.labels }}` }}
244- cache-from: type= gha
245- cache-to: type= gha,mode= max
246-
247211{{- if .ADL.Spec.Deployment }}
248212
249213 deploy:
0 commit comments