From a1a45e9100e6573b060ad3b98216e8e23f326833 Mon Sep 17 00:00:00 2001 From: Tasha Snow Date: Sun, 19 Mar 2023 16:05:19 -0600 Subject: [PATCH] Build test.yml --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b624a34 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Test container image build + +on: + pull_request: + paths: + - 'environment.yml' + # Trigger rebuilds if the test process changes + - '.github/workflows/test.yaml' + + +jobs: + test-build: + runs-on: ubuntu-latest + steps: + + # For biggish images, github actions runs out of disk space. + # So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use + # https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150 + # and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104 + # This gives us a total of about 52G of free space, which should be enough for now + - name: cleanup disk space + run: | + sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc + df -h + - name: checkout files in repo + uses: actions/checkout@main + + - name: Build the image and push it if `NO_PUSH` disabled + uses: jupyterhub/repo2docker-action@master + with: # make sure username & password/token matches your registry + NO_PUSH: "true" + DOCKER_REGISTRY: "quay.io" + IMAGE_NAME: "cryointhecloud/cryo-hub-r-image" + # Put repo contents in /srv/repo, so they aren't mangled when we put user home in /home/jovyan + REPO_DIR: /srv/repo + + # Lets us monitor disks getting full as images get bigger over time + - name: Show how much disk space is left + run: df -h