Skip to content

Commit 00c0849

Browse files
authored
ci: add NBC docker publish workflow (#650)
Signed-off-by: noa limoy <[email protected]>
1 parent 860b89b commit 00c0849

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build & Publish Notebook Controller Docker image
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- v*-branch
7+
- notebooks-v1
8+
paths:
9+
- components/notebook-controller/**
10+
- components/common/**
11+
- releasing/version/VERSION
12+
13+
env:
14+
IMG: ghcr.io/kubeflow/notebooks/notebook-controller
15+
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
16+
17+
jobs:
18+
push_to_registry:
19+
name: Build & Push Docker image to GHCR
20+
runs-on: ubuntu-22.04
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- uses: dorny/paths-filter@v3
26+
id: filter
27+
with:
28+
base: ${{ github.ref }}
29+
filters: |
30+
version:
31+
- 'releasing/version/VERSION'
32+
33+
- name: Login to GHCR
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Setup QEMU
41+
uses: docker/setup-qemu-action@v3
42+
43+
- name: Setup Docker Buildx
44+
uses: docker/setup-buildx-action@v3
45+
46+
- name: Build and push multi-arch docker image
47+
run: |
48+
cd components/notebook-controller
49+
ARCH=linux/amd64 make docker-build-multi-arch
50+
ARCH=linux/ppc64le make docker-build-multi-arch
51+
ARCH=linux/arm64/v8 make docker-build-multi-arch
52+
make docker-build-push-multi-arch
53+
54+
- name: Build and push latest multi-arch docker image
55+
if: github.ref == 'refs/heads/notebooks-v1'
56+
run: |
57+
export TAG=latest
58+
cd components/notebook-controller
59+
make docker-build-push-multi-arch
60+
61+
- name: Build and push multi-arch docker image on Version change
62+
id: version
63+
if: steps.filter.outputs.version == 'true'
64+
run: |
65+
export TAG=$(cat releasing/version/VERSION)
66+
cd components/notebook-controller
67+
make docker-build-push-multi-arch

components/notebook-controller/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Image URL to use all building/pushing image targets
2-
IMG ?= ghcr.io/kubeflow/kubeflow/notebook-controller
2+
IMG ?= ghcr.io/kubeflow/notebooks/notebook-controller
33
TAG ?= $(shell git describe --tags --always --dirty)
44
ARCH ?= linux/amd64
55

0 commit comments

Comments
 (0)