Skip to content

cross compilation for arm64 #610

cross compilation for arm64

cross compilation for arm64 #610

Workflow file for this run

---
name: Build Image
on:
workflow_dispatch:
push:
branches: ['*']
tags: ['*']
env:
IMG_TAGS: ${{ github.sha }}
IMG_REGISTRY_HOST: quay.io
IMG_REGISTRY_ORG: kuadrant
MAIN_BRANCH_NAME: main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Add latest tag
if: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
run: |
echo "IMG_TAGS=${{ env.IMG_TAGS }} latest" >> $GITHUB_ENV
- name: Add branch name tag
if: ${{ github.ref_name != env.MAIN_BRANCH_NAME }}
run: |
echo "IMG_TAGS=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image on amd64
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
build-args: |
GITHUB_SHA=${{ github.sha }}
tags: ${{ env.IMG_TAGS }}
file : ./Dockerfile
- name: Build Docker image on arm64
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
build-args: |
GITHUB_SHA=${{ github.sha }}
tags: ${{ env.IMG_TAGS }}
file : ./Dockerfile.aarch64