forked from kubeflow/kubeflow
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (59 loc) · 2.01 KB
/
example_notebook_servers_publish_TEMPLATE.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
67
name: Build & Publish Notebook Servers (TEMPLATE)
on:
workflow_call:
inputs:
build_arch:
required: true
description: "architectures to build for, comma separated"
type: string
image_folders:
required: true
description: "image folders to build, ordered by dependency, whitespace separated"
type: string
env:
REGISTRY: docker.io/kubeflownotebookswg
CACHE_IMAGE: ghcr.io/${{ github.repository }}/notebook-servers/build-cache
jobs:
build_and_push_images:
name: Build & Push Images
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: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: kubeflownotebookswg
password: ${{ secrets.KUBEFLOWNOTEBOOKSWG_DOCKER_TOKEN }}
- name: Build and Push Notebook Server images
env:
ARCH: ${{ inputs.build_arch }}
IMAGE_FOLDERS: ${{ inputs.image_folders }}
SHOULD_TAG_LATEST: ${{ github.ref == 'refs/heads/master' }}
SHOULD_TAG_VERSION: ${{ steps.filter.outputs.version == 'true' }}
run: |
if [[ "$SHOULD_TAG_LATEST" = "true" ]]; then
export ALSO_TAG_LATEST=1
fi
if [[ "$SHOULD_TAG_VERSION" = "true" ]]; then
export ALSO_TAG_VERSION=$(cat releasing/version/VERSION)
fi
cd components/example-notebook-servers/
make docker-build-push-multi-arch