forked from jupyterhub/zero-to-jupyterhub-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 2.06 KB
/
test-docker-build.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
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
#
name: Test docker multiarch build
# Trigger the workflow's on all PRs and pushes so that other contributors can
# run tests in their own forks. Avoid triggering these tests on changes to
# documentation only changes.
on:
pull_request:
paths-ignore:
- "doc/**"
- "**/test-docs.yaml"
- "**.md"
- "**/schema.yaml"
push:
paths-ignore:
- "doc/**"
- "**/test-docs.yaml"
- "**.md"
- "**/schema.yaml"
branches-ignore:
- "dependabot/**"
workflow_dispatch:
jobs:
# TODO: this is just a quick test to check the arm64 docker images
# Based on
# https://github.com/docker/build-push-action/blob/v2.3.0/docs/advanced/local-registry.md
# https://github.com/docker/build-push-action/blob/v2.3.0/docs/advanced/multi-platform.md
build_images:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
# https://github.com/jupyterhub/chartpress/pull/124
- name: Install chartpress buildx-platforms-dev version
run: pip install --no-cache-dir chartpress@git+https://github.com/manics/chartpress.git@buildx-platforms-skip
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# https://github.com/docker/login-action/tree/v1.8.0#github-container-registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to local registry
run: >-
chartpress --push --tag dev
--builder docker-buildx
--platform linux/amd64 --platform linux/arm64
--image-prefix ghcr.io/${{ github.repository_owner }}/z2jh-