Skip to content

Commit

Permalink
feature/FWF-3694 Updated CD action to Build and push Multiarch images…
Browse files Browse the repository at this point in the history
… into Docker registry (#2405)
  • Loading branch information
alanraju-aot authored Dec 5, 2024
1 parent b9ce624 commit 397f47d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/forms-flow-documents-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,31 +78,27 @@ jobs:
- name: Build and push Docker image
if: ${{ github.ref != 'refs/heads/master' }}
uses: docker/build-push-action@v4
with:
context: forms-flow-documents
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
run: |
docker buildx create --name mybuilder --use
cd ./forms-flow-documents
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file Dockerfile \
--file Dockerfile-ARM64 \
--tags: ${{ steps.meta.outputs.tags }}
--labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v4
with:
context: forms-flow-documents
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}, formsflow/forms-flow-documents-api:latest
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image - arm64
uses: docker/build-push-action@v4
with:
context: forms-flow-documents
file: forms-flow-documents/Dockerfile-ARM64
push: true
platforms: linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}-arm64
labels: ${{ steps.meta.outputs.labels }}
run: |
docker buildx create --name mybuilder --use
cd ./forms-flow-documents
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file Dockerfile \
--file Dockerfile-ARM64 \
--tags: ${{ steps.meta.outputs.tags }}, formsflow/forms-flow-documents-api:latest
--labels: ${{ steps.meta.outputs.labels }}
- name: Scan Docker image 🐳
uses: snyk/actions/docker@master
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-documents/Dockerfile-ARM64
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Author: Kurian Benoy
FROM python:python:3.12.6-slim
FROM python:3.12.6-slim

WORKDIR /forms-flow-documents/app

Expand Down

0 comments on commit 397f47d

Please sign in to comment.