-
Notifications
You must be signed in to change notification settings - Fork 447
85 lines (76 loc) · 2.52 KB
/
docker_build.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
75
76
77
78
79
80
81
82
83
84
85
name: Build Docker Image
on:
push: {}
pull_request: {}
schedule:
# Run daily
- cron: "6 4 * * *"
jobs:
docker:
runs-on: ubuntu-latest
env:
REPOSITORY_URL: ghcr.io
SPARKMAGIC_IMAGE_NAME: ${{ github.repository }}/jupyter:latest
SPARKMAGIC_DOCKERFILE: Dockerfile.jupyter
JUPYTER_IMAGE_NAME: ${{ github.repository }}/sparkmagic-livy:latest
JUPYTER_DOCKERFILE: Dockerfile.spark
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REPOSITORY_URL }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push with latest release - SparkMagic
uses: docker/build-push-action@v6
if: github.event_name == 'schedule'
with:
context: .
file: ${{ env.JUPYTER_DOCKERFILE }}
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REPOSITORY_URL }}/${{ env.SPARKMAGIC_IMAGE_NAME }}
- name: Build and push with latest release - Jupyter
uses: docker/build-push-action@v6
if: github.event_name == 'schedule'
with:
context: .
file: ${{ env.JUPYTER_DOCKERFILE }}
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REPOSITORY_URL }}/${{ env.JUPYTER_IMAGE_NAME }}
- name: Build and push with local packages - SparkMagic
uses: docker/build-push-action@v6
if: github.event_name == 'push'
with:
context: .
file: ${{ env.JUPYTER_DOCKERFILE }}
platforms: linux/amd64,linux/arm64
push: true
build-args: |
dev_mode="true"
tags: |
${{ env.REPOSITORY_URL }}/${{ env.SPARKMAGIC_IMAGE_NAME }}
- name: Build and push with local packages - Jupyter
uses: docker/build-push-action@v6
if: github.event_name == 'push'
with:
context: .
file: ${{ env.JUPYTER_DOCKERFILE }}
platforms: linux/amd64,linux/arm64
push: true
build-args: |
dev_mode="true"
tags: |
${{ env.REPOSITORY_URL }}/${{ env.JUPYTER_IMAGE_NAME }}