forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (169 loc) · 8.91 KB
/
images.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: Images
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3 # https://github.com/marketplace/actions/docker-setup-qemu
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # https://github.com/marketplace/actions/docker-setup-buildx
- name: Login to DockerHub
uses: docker/login-action@v3 # https://github.com/marketplace/actions/docker-login
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
######################################################################################################
# plbase
- name: Check whether images/plbase was modified
run: tools/check_path_modified.sh images/plbase images_plbase_modified
- name: Build and push prairielearn/plbase
if: ${{ env.images_plbase_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: images/plbase
# We don't build `priarielearn/prairielearn` itself for ARM, so we'll skip
# building the base image for `linux/arm64` as well. This results in
# significantly faster overall builds.
platforms: linux/amd64
push: true
no-cache: true
tags: prairielearn/plbase:latest,prairielearn/plbase:${{ github.sha }}
######################################################################################################
# prairielearn
- name: Build and push prairielearn/prairielearn
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: .
# QEMU is *extremely* slow on GitHub Actions, taking over 2 hours to
# build the `priarielearn/prairielearn` image for the `linux/arm64`
# platform. We will avoid building an ARM image for now. If GitHub
# ever offers ARM hosted runners, we can consider building ARM images.
platforms: linux/amd64
push: true
no-cache: true
tags: prairielearn/prairielearn:latest,prairielearn/prairielearn:${{ github.sha }}
######################################################################################################
# grader-c
- name: Check whether graders/c was modified
run: tools/check_path_modified.sh graders/c graders_c_modified
- name: Build and push prairielearn/grader-c
if: ${{ env.graders_c_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: graders/c
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/grader-c:latest,prairielearn/grader-c:${{ github.sha }}
######################################################################################################
# grader-java
- name: Check whether graders/java was modified
run: tools/check_path_modified.sh graders/java graders_java_modified
- name: Build and push prairielearn/grader-java
if: ${{ env.graders_java_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: graders/java
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/grader-java:latest,prairielearn/grader-java:${{ github.sha }}
######################################################################################################
# grader-python
- name: Check whether graders/python was modified
run: tools/check_path_modified.sh graders/python graders_python_modified
- name: Build and push prairielearn/grader-python
if: ${{ env.graders_python_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: graders/python
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/grader-python:latest,prairielearn/grader-python:${{ github.sha }}
######################################################################################################
# grader-r
- name: Check whether graders/r was modified
run: tools/check_path_modified.sh graders/r graders_r_modified
- name: Build and push prairielearn/grader-r
if: ${{ env.graders_r_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: graders/r
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/grader-r:latest,prairielearn/grader-r:${{ github.sha }}
######################################################################################################
# workspace-desktop
- name: Check whether workspaces/desktop was modified
run: tools/check_path_modified.sh workspaces/desktop workspaces_desktop_modified
- name: Build and push prairielearn/workspace-desktop
if: ${{ env.workspaces_desktop_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: workspaces/desktop
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/workspace-desktop:latest,prairielearn/workspace-desktop:${{ github.sha }}
######################################################################################################
# workspace-jupyterlab
- name: Check whether workspaces/jupyterlab was modified
run: tools/check_path_modified.sh workspaces/jupyterlab workspaces_jupyterlab_modified
- name: Build and push prairielearn/workspace-jupyterlab
if: ${{ env.workspaces_jupyterlab_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: workspaces/jupyterlab
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/workspace-jupyterlab:latest,prairielearn/workspace-jupyterlab:${{ github.sha }}
######################################################################################################
# workspace-jupyterlab-python
- name: Check whether workspaces/jupyterlab-python was modified
run: tools/check_path_modified.sh workspaces/jupyterlab-python workspaces_jupyterlab_python_modified
- name: Build and push prairielearn/workspace-jupyterlab-python
if: ${{ env.workspaces_jupyterlab_python_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: workspaces/jupyterlab-python
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/workspace-jupyterlab-python:latest,prairielearn/workspace-jupyterlab-python:${{ github.sha }}
######################################################################################################
# workspace-rstudio
- name: Check whether workspaces/rstudio was modified
run: tools/check_path_modified.sh workspaces/rstudio workspaces_rstudio_modified
- name: Build and push prairielearn/workspace-rstudio
if: ${{ env.workspaces_rstudio_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: workspaces/rstudio
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/workspace-rstudio:latest,prairielearn/workspace-rstudio:${{ github.sha }}
######################################################################################################
# workspace-xtermjs
- name: Check whether workspaces/xtermjs was modified
run: tools/check_path_modified.sh workspaces/xtermjs workspaces_xtermjs_modified
- name: Build and push prairielearn/workspace-xtermjs
if: ${{ env.workspaces_xtermjs_modified }}
uses: docker/build-push-action@v5 # https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: workspaces/xtermjs
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: prairielearn/workspace-xtermjs:latest,prairielearn/workspace-xtermjs:${{ github.sha }}