Skip to content

Commit

Permalink
ci: enable multi arch docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mikonse committed Jan 3, 2024
1 parent 9d9c32f commit 1fadb60
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,44 @@ jobs:
build_and_test_backend:
uses: ./.github/workflows/backend.yaml
secrets: inherit

test-build-docker:
name: Build and publish ready made docker containers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Nodejs
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: frontend

- name: Build API Image
id: build-api-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.DOCKER_IMAGE_NAME_API }}
tags: ${{ needs.get-distros.outputs.tags }}
platforms: linux/arm/v7, linux/arm64/v8, linux/amd64, linux/arm64
containerfiles: |
./docker/Dockerfile-api
- name: Build Frontend
working-directory: frontend
run: npx nx build web

- name: Build Frontend Image
id: build-frontend-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.DOCKER_IMAGE_NAME_FRONTEND }}
tags: ${{ needs.get-distros.outputs.tags }}
platforms: linux/arm/v7, linux/arm64/v8, linux/amd64, linux/arm64
containerfiles: |
./docker/Dockerfile-frontend
2 changes: 2 additions & 0 deletions .github/workflows/push_on_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
with:
image: ${{ env.DOCKER_IMAGE_NAME_API }}
tags: ${{ needs.get-distros.outputs.tags }}
platforms: linux/arm/v7, linux/arm64/v8, linux/amd64, linux/arm64
containerfiles: |
./docker/Dockerfile-api
Expand All @@ -89,6 +90,7 @@ jobs:
with:
image: ${{ env.DOCKER_IMAGE_NAME_FRONTEND }}
tags: ${{ needs.get-distros.outputs.tags }}
platforms: linux/arm/v7, linux/arm64/v8, linux/amd64, linux/arm64
containerfiles: |
./docker/Dockerfile-frontend
Expand Down

0 comments on commit 1fadb60

Please sign in to comment.