From 7cd245547bfafd53d0f6c8315ca32d3cf08c9de1 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Fri, 16 Feb 2024 16:09:54 +0000 Subject: [PATCH] Revert "temporarily avoid building base image" This reverts commit 4507dd9c300ca83096d48683474d56c4d626a2e0. --- .github/workflows/d4science-images.yml | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/.github/workflows/d4science-images.yml b/.github/workflows/d4science-images.yml index 0a2127c..5f15b35 100644 --- a/.github/workflows/d4science-images.yml +++ b/.github/workflows/d4science-images.yml @@ -23,6 +23,45 @@ jobs: "single-user-sobigdata-lipari23/Dockerfile" "single-user-sobigdata-aaai24/Dockerfile" + base-image: + name: Build base image + needs: detect-changes + if: needs.detect-changes.outputs.build-base == 1 + runs-on: ubuntu-latest + outputs: + base: ${{ steps.docker_meta_base.outputs.tags }} + steps: + - name: try to make free space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + - name: Checkout + uses: actions/checkout@v4 + - name: Docker meta + id: docker_meta_base + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository_owner }}/notebooks-d4science-base + tags: | + type=sha + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build base + uses: docker/build-push-action@v5 + with: + context: d4science-base + tags: ${{ steps.docker_meta_base.outputs.tags }} + labels: ${{ steps.docker_meta_base.outputs.labels }} + outputs: type=docker,dest=/tmp/base.tar + - name: Upload docker image as artifact + uses: actions/upload-artifact@v4 + with: + name: images + path: /tmp/base.tar + user-images: name: Build and push images if: fromJson(needs.detect-changes.outputs.matrix).image @@ -49,6 +88,16 @@ jobs: type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Get previous build base + uses: actions/download-artifact@v4 + with: + name: images + path: /tmp + - name: Load Docker images + run: | + docker load --input /tmp/base.tar + # we are so scarce on storage that this needs to be cleared + rm -rf /tmp/base.tar - name: Login to DockerHub uses: docker/login-action@v3 with: