Skip to content

Commit 091cc46

Browse files
committed
feat: Migrate pvcviewer controller publish action
Signed-off-by: noa limoy <[email protected]>
1 parent 88e00b4 commit 091cc46

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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: Build and push multi-arch docker image
45+
run: |
46+
cd components/pvcviewer-controller
47+
ARCH=linux/amd64 make docker-build-multi-arch
48+
ARCH=linux/ppc64le make docker-build-multi-arch
49+
ARCH=linux/arm64/v8 make docker-build-multi-arch
50+
make docker-build-push-multi-arch
51+
52+
- name: Build and push latest multi-arch docker image
53+
if: github.ref == 'refs/heads/notebooks-v1'
54+
run: |
55+
export TAG=latest
56+
cd components/pvcviewer-controller
57+
make docker-build-push-multi-arch
58+
59+
- name: Build and push multi-arch docker image on Version change
60+
id: version
61+
if: steps.filter.outputs.version == 'true'
62+
run: |
63+
export TAG=$(cat releasing/version/VERSION)
64+
cd components/pvcviewer-controller
65+
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)