forked from kubeflow/kubeflow
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (57 loc) · 1.82 KB
/
nb_controller_docker_publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build & Publish Notebook Controller Docker image
on:
push:
branches:
- master
- v*-branch
paths:
- components/notebook-controller/**
- components/common/**
- releasing/version/VERSION
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/notebook-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
name: Build & Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
version:
- 'releasing/version/VERSION'
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ env.DOCKER_USER }}
password: ${{ secrets.KUBEFLOWNOTEBOOKSWG_DOCKER_TOKEN }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push multi-arch docker image
run: |
cd components/notebook-controller
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
make docker-build-push-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
run: |
export TAG=latest
cd components/notebook-controller
make docker-build-push-multi-arch
- name: Build and push multi-arch docker image on Version change
id: version
if: steps.filter.outputs.version == 'true'
run: |
export TAG=$(cat releasing/version/VERSION)
cd components/notebook-controller
make docker-build-push-multi-arch