Skip to content

Build and push - pipeline image #6

Build and push - pipeline image

Build and push - pipeline image #6

name: Build and push 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-workflow
context: .
image-name: rec-sys-workflow
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 run number
id: version
run: |
echo "tag=v1.0.${GITHUB_RUN_NUMBER}" >> $GITHUB_OUTPUT
- name: Build and push ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: Containerfile
push: true
tags: quay.io/rh-ai-kickstart/${{ matrix.image-name }}:${{ steps.version.outputs.tag }}
build-args: |
IMAGE_TAG=${{ steps.version.outputs.tag }}