-
Notifications
You must be signed in to change notification settings - Fork 37
74 lines (59 loc) · 1.72 KB
/
docker.yml
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
68
69
70
71
72
73
74
# Build docker images with a Jupyter server with Cadabra
# kernel whenever a commit is pushed to github.
#
# Lint this thing with
#
# yq eval docker.yml
name: Docker
# on: [push]
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# arch:
# - amd64
# - arm64
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@master
- uses: actions/checkout@v3
# - name: Exit if not on master branch
# if: github.ref != 'refs/heads/master'
# run: exit 1
- name: Log in to Docker Hub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@master
with:
images: kpeeters/cadabra2-jupyter
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master
- name: Build Docker image
uses: docker/build-push-action@master
with:
platforms: linux/amd64, linux/arm64
context: .
file: docker/Dockerfile
push: true
#${{ github.ref == 'master' }}
labels: ${{ steps.meta.outputs.labels }}
tags: kpeeters/cadabra2-jupyter:latest
# outputs: type=docker
# - name: Upload artifact to github assets
# uses: actions/upload-artifact@main
# with:
# name: cadabra2-jupyter-${{ matrix.arch }}
# path: cadabra2-jupyter-${{ matrix.arch }}.tar