cross compilation for arm64 #610
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |