Skip to content

Add multi-arch builds for frontend and backend #16

Add multi-arch builds for frontend and backend

Add multi-arch builds for frontend and backend #16

Workflow file for this run

name: Dev Docker Build (Manual)

Check failure on line 1 in .github/workflows/dev-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/dev-build.yml

Invalid workflow file

(Line: 16, Col: 5): There's not enough info to determine what you meant. Add one of these properties: cancel-timeout-minutes, container, continue-on-error, defaults, env, environment, outputs, runs-on, secrets, services, snapshot, steps, timeout-minutes, uses, with, (Line: 65, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 72, Col: 11): 'platforms' is already defined, (Line: 81, Col: 11): 'cache-from' is already defined, (Line: 82, Col: 11): 'cache-to' is already defined, (Line: 85, Col: 5): There's not enough info to determine what you meant. Add one of these properties: cancel-timeout-minutes, container, continue-on-error, defaults, env, environment, outputs, runs-on, secrets, services, snapshot, steps, timeout-minutes, uses, with, (Line: 123, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory, (Line: 130, Col: 11): 'platforms' is already defined, (Line: 140, Col: 11): 'cache-from' is already defined, (Line: 141, Col: 11): 'cache-to' is already defined
on:
workflow_dispatch:
env:
DOCKERHUB_BACKEND_IMAGE: tess1o/geopulse-backend
DOCKERHUB_FRONTEND_IMAGE: tess1o/geopulse-ui
DEV_VERSION: dev
permissions:
contents: read
jobs:
build-frontend:
name: Build Frontend Multi-Arch (dev)
build-frontend-amd64:
name: Build Frontend AMD64 (dev)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Frontend AMD64 (dev)
uses: docker/build-push-action@v5
with:
context: .
file: frontend/Dockerfile
platforms: linux/amd64
push: true
build-args: |
VERSION=${{ env.DEV_VERSION }}
tags: |
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}-amd64
cache-from: type=gha,scope=dev-frontend-amd64
cache-to: type=gha,mode=max,scope=dev-frontend-amd64
build-frontend-arm64:
name: Build Frontend ARM64 (dev)
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Frontend Multi-Arch (dev)
- name: Build and push Frontend ARM64 (dev)
uses: docker/build-push-action@v5
with:
context: .
file: frontend/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/arm64
push: true
build-args: |
VERSION=${{ env.DEV_VERSION }}
tags: |
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}
cache-from: type=gha,scope=dev-frontend-multiarch
cache-to: type=gha,mode=max,scope=dev-frontend-multiarch
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}-arm64
cache-from: type=gha,scope=dev-frontend-arm64
cache-to: type=gha,mode=max,scope=dev-frontend-arm64
build-backend-native:
name: Build Backend Native Multi-Arch (dev)
create-frontend-manifest:
name: Create Frontend Multi-Arch Manifest (dev)
needs: [build-frontend-amd64, build-frontend-arm64]
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create and push Frontend manifest (dev)
run: |
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }} \
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}-amd64 \
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}-arm64
build-backend-native-amd64:
name: Build Backend Native AMD64 (dev)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Backend Native Multi-Arch (dev)
- name: Build and push Backend Native AMD64 (dev)
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile.native
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
build-args: |
VERSION=${{ env.DEV_VERSION }}-native
QUARKUS_NATIVE_BUILD_ARGS=
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native
cache-from: type=gha,scope=dev-backend-native-multiarch
cache-to: type=gha,mode=max,scope=dev-backend-native-multiarch
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-amd64
cache-from: type=gha,scope=dev-backend-native-amd64
cache-to: type=gha,mode=max,scope=dev-backend-native-amd64
build-backend-native-arm64:
name: Build Backend Native ARM64 (dev)
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Backend Native ARM64 (dev)
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile.native
platforms: linux/arm64
push: true
build-args: |
VERSION=${{ env.DEV_VERSION }}-native
QUARKUS_NATIVE_BUILD_ARGS=
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-arm64
cache-from: type=gha,scope=dev-backend-native-arm64
cache-to: type=gha,mode=max,scope=dev-backend-native-arm64
create-backend-native-manifest:
name: Create Backend Native Multi-Arch Manifest (dev)
needs: [build-backend-native-amd64, build-backend-native-arm64]
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create and push Backend Native manifest (dev)
run: |
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-amd64 \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-arm64