Skip to content

IntegraionTests: Waiting for expected conditions before emulate JobSet controller manager #53

IntegraionTests: Waiting for expected conditions before emulate JobSet controller manager

IntegraionTests: Waiting for expected conditions before emulate JobSet controller manager #53

name: Build and Publish Images
on:
- push
- pull_request
jobs:
build-and-publish:
name: Build and Publish Images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- component-name: trainer-controller-manager
dockerfile: cmd/trainer-controller-manager/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le
- component-name: model-initializer
dockerfile: cmd/initializer/model/Dockerfile
platforms: linux/amd64,linux/arm64
- component-name: dataset-initializer
dockerfile: cmd/initializer/dataset/Dockerfile
platforms: linux/amd64,linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Login
# Trigger workflow only for kubeflow/trainer repository with specific branch (master, release-*) or tag (v.*).
if: >-
github.repository == 'kubeflow/trainer' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish Component ${{ matrix.component-name }}
# Trigger workflow only for kubeflow/trainer repository with specific branch (master, release-*) or tag (v.*).
if: >-
github.repository == 'kubeflow/trainer' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
id: publish
uses: ./.github/workflows/template-publish-image
with:
image: docker.io/kubeflow/${{ matrix.component-name }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
context: ${{ matrix.context }}
push: true
- name: Test Build For Component ${{ matrix.component-name }}
if: steps.publish.outcome == 'skipped'
uses: ./.github/workflows/template-publish-image
with:
image: docker.io/kubeflow/${{ matrix.component-name }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
context: ${{ matrix.context }}
push: false