mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-13 13:02:56 +00:00
Start adding platform support
This commit is contained in:
16
.github/workflows/build-docker.yml
vendored
16
.github/workflows/build-docker.yml
vendored
@@ -49,27 +49,31 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-base-notebook:
|
||||
build-amd64-base-notebook:
|
||||
uses: ./.github/workflows/sub-build-push-image.yml
|
||||
with:
|
||||
imageName: base-notebook
|
||||
parentImageName: ""
|
||||
imageName: base-notebook
|
||||
platform: amd64
|
||||
|
||||
test-base-notebook:
|
||||
test-amd64-base-notebook:
|
||||
needs: [build-base-notebook]
|
||||
uses: ./.github/workflows/sub-test-image.yml
|
||||
with:
|
||||
imageName: base-notebook
|
||||
platform: amd64
|
||||
|
||||
build-minimal-notebook:
|
||||
build-amd64-minimal-notebook:
|
||||
needs: [build-base-notebook]
|
||||
uses: ./.github/workflows/sub-build-push-image.yml
|
||||
with:
|
||||
imageName: minimal-notebook
|
||||
parentImageName: base-notebook
|
||||
imageName: minimal-notebook
|
||||
platform: amd64
|
||||
|
||||
test-minimal-notebook:
|
||||
test-amd64-minimal-notebook:
|
||||
needs: [build-minimal-notebook]
|
||||
uses: ./.github/workflows/sub-test-image.yml
|
||||
with:
|
||||
imageName: minimal-notebook
|
||||
platform: amd64
|
||||
|
18
.github/workflows/sub-build-push-image.yml
vendored
18
.github/workflows/sub-build-push-image.yml
vendored
@@ -11,6 +11,13 @@ on:
|
||||
description: "Parent image name"
|
||||
required: true
|
||||
type: string
|
||||
platform:
|
||||
description: "Target platform for the built image"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
jobs:
|
||||
build-push-image:
|
||||
@@ -25,12 +32,12 @@ jobs:
|
||||
if: ${{ inputs.parentImageName != '' }}
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.parentImageName }}
|
||||
name: ${{ inputs.parentImageName }}-${{ inputs.platform }}
|
||||
path: /tmp/
|
||||
- name: Load downloaded image to docker 📥
|
||||
if: ${{ inputs.parentImageName != '' }}
|
||||
run: |
|
||||
docker load --input /tmp/${{ inputs.parentImageName }}.tar
|
||||
docker load --input /tmp/${{ inputs.parentImageName }}-${{ inputs.platform }}.tar
|
||||
docker image ls -a
|
||||
shell: bash
|
||||
|
||||
@@ -40,9 +47,10 @@ jobs:
|
||||
context: ${{ inputs.imageName }}/
|
||||
file: ${{ inputs.imageName }}/Dockerfile
|
||||
tags: jupyter/${{ inputs.imageName }}:latest
|
||||
outputs: type=docker,dest=/tmp/${{ inputs.imageName }}.tar
|
||||
outputs: type=docker,dest=/tmp/${{ inputs.imageName }}-${{ inputs.platform }}.tar
|
||||
platform: linux/${{ inputs.platform }}
|
||||
- name: Upload artifact 💾
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.imageName }}
|
||||
path: /tmp/${{ inputs.imageName }}.tar
|
||||
name: ${{ inputs.imageName }}-${{ inputs.platform }}
|
||||
path: /tmp/${{ inputs.imageName }}-${{ inputs.platform }}.tar
|
||||
|
11
.github/workflows/sub-test-image.yml
vendored
11
.github/workflows/sub-test-image.yml
vendored
@@ -7,6 +7,13 @@ on:
|
||||
description: "Image name to be tested"
|
||||
required: true
|
||||
type: string
|
||||
platform:
|
||||
description: "Target platform for the built image"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
jobs:
|
||||
test-image:
|
||||
@@ -20,11 +27,11 @@ jobs:
|
||||
- name: Download built image 📥
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.imageName }}
|
||||
name: ${{ inputs.imageName }}-${{ inputs.platform }}
|
||||
path: /tmp/
|
||||
- name: Load downloaded image to docker 📥
|
||||
run: |
|
||||
docker load --input /tmp/${{ inputs.imageName }}.tar
|
||||
docker load --input /tmp/${{ inputs.imageName }}-${{ inputs.platform }}.tar
|
||||
docker image ls -a
|
||||
shell: bash
|
||||
|
||||
|
Reference in New Issue
Block a user