Skip to content

Commit 71fd6d4

Browse files
committed
feat: Migrate pvcviewer controller publish action
Signed-off-by: noa limoy <[email protected]>
1 parent e4c3bc1 commit 71fd6d4

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build & Publish PVCViewer Controller Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- v*-branch
8+
- notebooks-v1
9+
- feature/migrate_pvcviewer_controller_docker_publish_to_notebooks
10+
paths:
11+
- components/pvcviewer-controller/**
12+
- components/common/**
13+
- releasing/version/VERSION
14+
15+
env:
16+
IMG: ghcr.io/noalimoy/notebooks/pvcviewer-controller
17+
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
18+
19+
jobs:
20+
push_to_registry:
21+
name: Build & Push image to GHCR
22+
runs-on: ubuntu-22.04
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- uses: dorny/paths-filter@v3
28+
id: filter
29+
with:
30+
base: ${{ github.ref }}
31+
filters: |
32+
version:
33+
- 'releasing/version/VERSION'
34+
35+
- name: Login to GHCR
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ghcr.io
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Setup Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Show Buildx info
46+
run: docker buildx inspect --bootstrap
47+
48+
- name: Show registered binfmt entries (host)
49+
# prints /proc/sys/fs/binfmt_misc on the runner
50+
run: |
51+
echo "==== /proc/sys/fs/binfmt_misc ===="
52+
ls -l /proc/sys/fs/binfmt_misc || true
53+
cat /proc/sys/fs/binfmt_misc/* || true
54+
55+
- name: Check tonistiigi/binfmt (try to run helper)
56+
run: docker run --privileged --rm tonistiigi/binfmt --help || true
57+
58+
- name: Build and push multi-arch docker image
59+
run: |
60+
cd components/pvcviewer-controller
61+
ARCH=linux/amd64 make docker-build-multi-arch
62+
ARCH=linux/ppc64le make docker-build-multi-arch
63+
ARCH=linux/arm64/v8 make docker-build-multi-arch
64+
make docker-build-push-multi-arch
65+
66+
- name: Build and push latest multi-arch docker image
67+
if: github.ref == 'refs/heads/notebooks-v1'
68+
run: |
69+
export TAG=latest
70+
cd components/pvcviewer-controller
71+
make docker-build-push-multi-arch
72+
73+
- name: Build and push multi-arch docker image on Version change
74+
id: version
75+
if: steps.filter.outputs.version == 'true'
76+
run: |
77+
export TAG=$(cat releasing/version/VERSION)
78+
cd components/pvcviewer-controller
79+
make docker-build-push-multi-arch

components/pvcviewer-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/pvcviewer-controller
2+
IMG ?= ghcr.io/kubeflow/notebooks/pvcviewer-controller
33
TAG ?= $(shell git describe --tags --always --dirty)
44
ARCH ?= linux/amd64
55

0 commit comments

Comments
 (0)