Skip to content

Commit

Permalink
Multi-arch Build support (#262)
Browse files Browse the repository at this point in the history
* Enabled CI to provide additional support for s390x and power

Signed-off-by: Nishan Acharya IBM <[email protected]>

* Modified Quay Access token to Password for consistency

Signed-off-by: Nishan Acharya IBM <[email protected]>

* runtimes: remove distributed executor backend option from vllm (#257)

it's the default

Signed-off-by: Daniele Trifirò <[email protected]>
Signed-off-by: Nishan Acharya IBM <[email protected]>

* [RHOAIENG-9746] - Missing log entry in StorageConfig controller of odh-model-controller (#263)

Signed-off-by: Spolti <[email protected]>
Signed-off-by: Nishan Acharya IBM <[email protected]>

* Modified the tag to vX.Y.Z-latest format

Signed-off-by: Nishan Acharya IBM <[email protected]>

---------

Signed-off-by: Nishan Acharya IBM <[email protected]>
Signed-off-by: Daniele Trifirò <[email protected]>
Signed-off-by: Spolti <[email protected]>
Co-authored-by: Daniele <[email protected]>
Co-authored-by: Filippe Spolti <[email protected]>
  • Loading branch information
3 people authored Sep 13, 2024
1 parent 9617f48 commit 0af4425
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and Push Image for Multi-Arch CI- Additional support for s390x & Power along with arm64 & amd64

on:
workflow_dispatch:
push:
branches:
- main
- 'release-[0-9]+\.[0-9]+\.[0-9]+'
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/main" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "${GITHUB_REF}" == refs/heads/release-* ]]; then
VERSION="${GITHUB_REF#refs/heads/release-}"
echo "TAG=v${VERSION}-latest" >> $GITHUB_ENV
elif [[ "${GITHUB_REF}" == refs/tags/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

0 comments on commit 0af4425

Please sign in to comment.