generated from berkeley-dsep-infra/hub-user-image-template
-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (36 loc) · 1.13 KB
/
build-test-image.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
name: Build and test container image
on:
pull_request:
jobs:
test-build:
runs-on: ubuntu-latest
env:
DOCKER_CONFIG: $HOME/.docker
steps:
- name: Checkout files in repo
uses: actions/checkout@v4
- name: See if the image config changed
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_ignore: |
README.md
CONTRIBUTING.md
LICENSE
.github/**
images/**
- name: Cleanup disk space
if: steps.changed-files.outputs.any_changed == 'true'
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h
- name: Build and test the image if any image file(s) changed
if: steps.changed-files.outputs.any_changed == 'true'
uses: jupyterhub/repo2docker-action@master
with:
FORCE_REPO2DOCKER_VERSION: jupyter-repo2docker==2024.07.0
REPO_DIR: /srv/repo
NO_PUSH: true
# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
run: df -h