Remove v1 GitHub workflows #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Kubeflow Trainer 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: training-operator-v2 | |
dockerfile: cmd/training-operator.v2alpha1/Dockerfile | |
platforms: linux/amd64,linux/arm64,linux/ppc64le | |
tag-prefix: v2alpha1 | |
- component-name: model-initializer-v2 | |
dockerfile: cmd/initializer_v2/model/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tag-prefix: v2 | |
- component-name: dataset-initializer-v2 | |
dockerfile: cmd/initializer_v2/dataset/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tag-prefix: v2 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Free-Up Disk Space | |
uses: ./.github/workflows/free-up-disk-space | |
- name: Docker Login | |
# Trigger workflow only for kubeflow/training-operator repository with specific branch (master, release-*) or tag (v.*). | |
if: >- | |
github.repository == 'kubeflow/training-operator' && | |
(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/training-operator repository with specific branch (master, release-*) or tag (v.*). | |
if: >- | |
github.repository == 'kubeflow/training-operator' && | |
(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 }} | |
tag-prefix: ${{ matrix.tag-prefix }} | |
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 }} | |
tag-prefix: ${{ matrix.tag-prefix }} | |
push: false |