Skip to content

Commit 6592e67

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

File tree

2 files changed

+69
-1
lines changed

2 files changed

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