Skip to content

Build and push - model registry image #2

Build and push - model registry image

Build and push - model registry image #2

name: Build and push - model registry image
on:
workflow_dispatch:
env:
PROJECT_DIR: "."
jobs:
build-and-push-image:
name: Build and Push container image
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: rec-sys-model-registry
context: oc-tools
image-name: rec-sys-model-registry
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set version from last commit hash
id: version
run: |
echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.context }}/Containerfile
push: true
tags: |
quay.io/rh-ai-kickstart/${{ matrix.image-name }}:${{ steps.version.outputs.tag }}
quay.io/rh-ai-kickstart/${{ matrix.image-name }}:latest
build-args: |
IMAGE_TAG=${{ steps.version.outputs.tag }}