diff --git a/.github/actions/create-dev-env/action.yml b/.github/actions/create-dev-env/action.yml index 71b0cb74..2956e9c9 100644 --- a/.github/actions/create-dev-env/action.yml +++ b/.github/actions/create-dev-env/action.yml @@ -11,16 +11,6 @@ runs: # sudo rm -rf /opt/ghc # shell: bash - # Setup docker to build for multiple platforms, see: - # https://github.com/docker/build-push-action/tree/master#usage - # https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md - - name: Set up QEMU (for docker buildx) 🐳 - uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # dependabot updates to latest release - - # https://github.com/docker/build-push-action/tree/master#usage - - name: Set up Docker Buildx (for multi-arch builds) 🐳 - uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # dependabot updates to latest release - - name: Set Up Python 🐍 uses: actions/setup-python@v3 with: diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 8bd62291..303a44f5 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -59,6 +59,7 @@ jobs: parentImageName: "" imageName: base-notebook platform: amd64 + runsOn: ubuntu-latest test-amd64-base-notebook: needs: [build-amd64-base-notebook] @@ -66,6 +67,7 @@ jobs: with: imageName: base-notebook platform: amd64 + runsOn: ubuntu-latest build-amd64-minimal-notebook: needs: [build-amd64-base-notebook] @@ -74,6 +76,7 @@ jobs: parentImageName: base-notebook imageName: minimal-notebook platform: amd64 + runsOn: ubuntu-latest test-amd64-minimal-notebook: needs: [build-amd64-minimal-notebook] @@ -81,32 +84,4 @@ jobs: with: imageName: minimal-notebook platform: amd64 - - build-arm64-base-notebook: - uses: ./.github/workflows/sub-build-push-image.yml - with: - parentImageName: "" - imageName: base-notebook - platform: arm64 - - test-arm64-base-notebook: - needs: [build-arm64-base-notebook] - uses: ./.github/workflows/sub-test-image.yml - with: - imageName: base-notebook - platform: arm64 - - build-arm64-minimal-notebook: - needs: [build-arm64-base-notebook] - uses: ./.github/workflows/sub-build-push-image.yml - with: - parentImageName: base-notebook - imageName: minimal-notebook - platform: arm64 - - test-arm64-minimal-notebook: - needs: [build-arm64-minimal-notebook] - uses: ./.github/workflows/sub-test-image.yml - with: - imageName: minimal-notebook - platform: arm64 + runsOn: ubuntu-latest diff --git a/.github/workflows/sub-build-push-image.yml b/.github/workflows/sub-build-push-image.yml index 554e1f09..64772654 100644 --- a/.github/workflows/sub-build-push-image.yml +++ b/.github/workflows/sub-build-push-image.yml @@ -15,10 +15,14 @@ on: description: "Target platform for the built image" required: true type: string + runsOn: + description: "Image to be run on" + required: true + type: string jobs: build-push-image: - runs-on: ubuntu-latest + runs-on: ${{ inputs.runsOn }} steps: - name: Checkout Repo ⚡️ uses: actions/checkout@v3 @@ -39,13 +43,13 @@ jobs: shell: bash - name: Build image 🛠 - uses: docker/build-push-action@v3 - with: - context: ${{ inputs.imageName }}/ - file: ${{ inputs.imageName }}/Dockerfile - tags: jupyter/${{ inputs.imageName }}:latest - outputs: type=docker,dest=/tmp/${{ inputs.imageName }}-${{ inputs.platform }}.tar - platforms: linux/${{ inputs.platform }} + working-directory: ${{ inputs.imageName }} + run: docker build --tag jupyter/${{ inputs.imageName }} --tag jupyter/${{ inputs.imageName }} . + shell: bash + - name: Save image as a file 💾 + run: docker save jupyter/base-notebook -o /tmp/${{ inputs.imageName }}-${{ inputs.platform }}.tar + shell: bash + - name: Upload artifact 💾 uses: actions/upload-artifact@v3 with: