Skip to content

Merge remote-tracking branch 'upstream/main' #1

Merge remote-tracking branch 'upstream/main'

Merge remote-tracking branch 'upstream/main' #1

Workflow file for this run

name: Build and Push Image for Multi-Arch CI- Additional support for s390x & Power along with arm64 & amd64
on:
workflow_dispatch:
push:
branches:
- incubating
- main
tags:
- 'latest'
- 'v*'
env:
IMAGE_NAME: "odh-model-controller"
REPO_NAME: "opendatahub"
REGISTRY_NAME: "quay.io"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Quay
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set Docker Tag
run: |
if [[ "${GITHUB_REF}" == "refs/heads/incubating" ]]; then
echo "TAG=fast" >> $GITHUB_ENV
elif [[ "${GITHUB_REF}" == refs/heads/main ]]; then
echo "TAG=stable" >> $GITHUB_ENV
elif [[ "${GITHUB_REF}" == refs/tags/odh-v* ]]; then
TAG="${GITHUB_REF#refs/tags/}"
echo "TAG=${TAG}" >> $GITHUB_ENV
else
echo "Branch or tag is not found. Image can't be pushed. Please check and try again!!"
exit 1
fi
- name: Build and push controller image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
context: .
file: Containerfile
push: true
tags: |
${{ env.REGISTRY_NAME }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
debug: true