Skip to content

Commit 832a156

Browse files
committed
feat: Migrate pvcviewer controller publish action
Signed-off-by: noa limoy <[email protected]>
1 parent 5f191bc commit 832a156

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build & Publish PVCViewer Controller Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- v*-branch
8+
- feature/migrate_pvcviewer_controller_docker_publish_to_notebooks
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+
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: Build and push multi-arch docker image
46+
run: |
47+
cd components/pvcviewer-controller
48+
ARCH=linux/amd64 make docker-build-multi-arch
49+
ARCH=linux/ppc64le make docker-build-multi-arch
50+
ARCH=linux/arm64/v8 make docker-build-multi-arch
51+
make docker-build-push-multi-arch
52+
53+
- name: Build and push latest multi-arch docker image
54+
if: github.ref == 'refs/heads/main'
55+
run: |
56+
export TAG=latest
57+
cd components/pvcviewer-controller
58+
make docker-build-push-multi-arch
59+
60+
- name: Build and push multi-arch docker image on Version change
61+
id: version
62+
if: steps.filter.outputs.version == 'true'
63+
run: |
64+
export TAG=$(cat releasing/version/VERSION)
65+
cd components/pvcviewer-controller
66+
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/noalimoy/notebooks/pvcviewer-controller
33
TAG ?= $(shell git describe --tags --always --dirty)
44
ARCH ?= linux/amd64
55

0 commit comments

Comments
 (0)