Skip to content

Commit f49698e

Browse files
committed
feat: Migrate kubeflow/kubeflow jwa_docker_publish.yaml GitHub Action to kubeflow/notebooks - notebooks-v1 branch
Signed-off-by: Yehudit Kerido <[email protected]>
1 parent 290935a commit f49698e

File tree

3 files changed

+92
-1
lines changed

3 files changed

+92
-1
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Build & Publish JWA Docker image
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- v*-branch
7+
- notebooks-v1
8+
paths:
9+
- components/crud-web-apps/jupyter/**
10+
- components/crud-web-apps/common/**
11+
- releasing/version/VERSION
12+
13+
env:
14+
IMG: ghcr.io/kubeflow/notebooks/jupyter-web-app
15+
PLATFORMS: linux/amd64,linux/ppc64le,linux/arm64
16+
17+
jobs:
18+
push_to_registry:
19+
name: Build & Push image to GHCR Hub
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+
with:
43+
platforms: amd64,ppc64le,arm64
44+
45+
- name: Setup Docker Buildx
46+
uses: docker/setup-buildx-action@v3
47+
48+
- name: Build and push multi-arch docker image
49+
uses: docker/build-push-action@v5
50+
with:
51+
context: components/crud-web-apps/
52+
file: components/crud-web-apps/jupyter/Dockerfile
53+
platforms: ${{ env.PLATFORMS }}
54+
push: true
55+
tags: |
56+
${{ env.IMG }}:${{ github.sha }}
57+
cache-from: type=gha
58+
cache-to: type=gha,mode=max
59+
60+
- name: Build and push latest multi-arch docker image
61+
if: github.ref == 'refs/heads/main'
62+
uses: docker/build-push-action@v5
63+
with:
64+
context: components/crud-web-apps/
65+
file: components/crud-web-apps/jupyter/Dockerfile
66+
platforms: ${{ env.PLATFORMS }}
67+
push: true
68+
tags: |
69+
${{ env.IMG }}:latest
70+
cache-from: type=gha
71+
cache-to: type=gha,mode=max
72+
73+
- name: Get version tag
74+
id: version-tag
75+
if: steps.filter.outputs.version == 'true'
76+
run: echo "version=$(cat releasing/version/VERSION)" >> $GITHUB_OUTPUT
77+
78+
- name: Build and push multi-arch docker image on Version change
79+
id: version-build
80+
if: steps.filter.outputs.version == 'true'
81+
uses: docker/build-push-action@v5
82+
with:
83+
context: components/crud-web-apps/
84+
file: components/crud-web-apps/jupyter/Dockerfile
85+
platforms: ${{ env.PLATFORMS }}
86+
push: true
87+
tags: |
88+
${{ env.IMG }}:${{ steps.version-tag.outputs.version }}
89+
cache-from: type=gha
90+
cache-to: type=gha,mode=max

components/crud-web-apps/jupyter/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
IMG ?= ghcr.io/kubeflow/kubeflow/jupyter-web-app
1+
IMG ?= ghcr.io/kubeflow/notebooks/jupyter-web-app
22
TAG ?= $(shell git describe --tags --always --dirty)
33
DOCKERFILE ?= jupyter/Dockerfile
44
ARCH ?= linux/amd64

releasing/version/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
latest

0 commit comments

Comments
 (0)