Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdikhashan committed Feb 27, 2025
1 parent 3c6c90f commit 9699402
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build-and-push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Docker Login
- name: GHCR 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 }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Component ${{ matrix.component-name }}
# Trigger workflow only for kubeflow/trainer repository with specific branch (master, release-*) or tag (v.*).
Expand All @@ -45,7 +46,7 @@ jobs:
id: publish
uses: ./.github/workflows/template-publish-image
with:
image: docker.io/kubeflow/${{ matrix.component-name }}
image: ghcr.io/kubeflow/${{ matrix.component-name }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
context: ${{ matrix.context }}
Expand All @@ -55,7 +56,7 @@ jobs:
if: steps.publish.outcome == 'skipped'
uses: ./.github/workflows/template-publish-image
with:
image: docker.io/kubeflow/${{ matrix.component-name }}
image: ghcr.io/kubeflow/${{ matrix.component-name }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
context: ${{ matrix.context }}
Expand Down

0 comments on commit 9699402

Please sign in to comment.