forked from jupyterhub/zero-to-jupyterhub-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.78 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
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/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
# changes not influencing the images.
on:
pull_request:
paths:
- "images/**"
- "chartpress.yaml"
- ".github/workflows/test-docker-build.yaml"
push:
paths:
- "images/**"
- "chartpress.yaml"
- ".github/workflows/test-docker-build.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
- "update-*"
- "vuln-scan-*"
workflow_dispatch:
jobs:
# This is 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-22.04
steps:
- uses: actions/checkout@v4
with:
# chartpress requires git history to set chart version and image tags
# correctly
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install chartpress
run: pip install chartpress
- name: Set up QEMU (for docker buildx)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx (for chartpress multi-arch builds)
uses: docker/setup-buildx-action@v3
- name: Build a multiple architecture Docker image
run: >-
chartpress
--builder docker-buildx
--platform linux/amd64 --platform linux/arm64