Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] migrate docker images to ghcr #2520

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/build-and-publish-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ on:
dockerfile:
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: false
DOCKERHUB_TOKEN:
required: false

jobs:
build-and-publish:
Expand All @@ -27,15 +22,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Docker Login
- name: GHCR Login
# Trigger workflow only for kubeflow/katib repository with specific branch (master, release-.*) or tag (v.*).
if: >-
github.repository == 'kubeflow/katib' &&
(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 ${{ inputs.component-name }}
# Trigger workflow only for kubeflow/katib repository with specific branch (master, release-.*) or tag (v.*).
Expand All @@ -45,7 +41,7 @@ jobs:
id: publish
uses: ./.github/workflows/template-publish-image
with:
image: docker.io/kubeflowkatib/${{ inputs.component-name }}
image: ghcr.io/kubeflowkatib/${{ inputs.component-name }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, the naming convention in GHCR should be ghcr.io/<org name or user name>/....

So the second item between /s might need to be changed to kubeflow

dockerfile: ${{ inputs.dockerfile }}
platforms: ${{ inputs.platforms }}
push: true
Expand All @@ -54,7 +50,7 @@ jobs:
if: steps.publish.outcome == 'skipped'
uses: ./.github/workflows/template-publish-image
with:
image: docker.io/kubeflowkatib/${{ inputs.component-name }}
image: ghcr.io/kubeflowkatib/${{ inputs.component-name }}
dockerfile: ${{ inputs.dockerfile }}
platforms: ${{ inputs.platforms }}
push: false
3 changes: 0 additions & 3 deletions .github/workflows/publish-algorithm-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
component-name: ${{ matrix.component-name }}
platforms: linux/amd64,linux/arm64
dockerfile: ${{ matrix.dockerfile }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

strategy:
fail-fast: false
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish-conformance-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
component-name: ${{ matrix.component-name }}
platforms: linux/amd64,linux/arm64
dockerfile: ${{ matrix.dockerfile }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

strategy:
fail-fast: false
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish-core-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
component-name: ${{ matrix.component-name }}
platforms: linux/amd64,linux/arm64
dockerfile: ${{ matrix.dockerfile }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

strategy:
fail-fast: false
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish-trial-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
component-name: ${{ matrix.trial-name }}
platforms: ${{ matrix.platforms }}
dockerfile: ${{ matrix.dockerfile }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

strategy:
fail-fast: false
Expand Down
Loading