Skip to content

[WIP]enable multi-arch build #1361

[WIP]enable multi-arch build

[WIP]enable multi-arch build #1361

Workflow file for this run

name: oci-builds
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
jobs:
build-mapt:
name: build-mapt
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
go:
- '1.21'
os: ['linux']
arch: ['amd64', 'arm64']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build image for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
IMG=ghcr.io/redhat-developer/mapt:pr-${{ github.event.number }}-${{matrix.arch}} ARCH=${{matrix.arch}} make oci-build
IMG=ghcr.io/redhat-developer/mapt:pr-${{ github.event.number }}-${{matrix.arch}} ARCH=${{matrix.arch}} make oci-save
echo "ghcr.io/redhat-developer/mapt:pr-${{ github.event.number }}" > mapt-image
- name: Save image for PR
uses: actions/upload-artifact@v4
with:
name: mapt-pr-${{ github.event.number }}
path: mapt*
- name: Build image
if: ${{ github.event_name != 'pull_request' }}
shell: bash
run: make oci-build
- name: Log in to quay.io Registry
if: ${{ github.event_name != 'pull_request' }}
uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
- name: Push image
if: ${{ github.event_name != 'pull_request' }}
shell: bash
run: make oci-push