mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 07:22:57 +00:00
Add amd64 images tagging and push to DockerHub
This commit is contained in:
11
.github/workflows/build-docker.yml
vendored
11
.github/workflows/build-docker.yml
vendored
@@ -85,3 +85,14 @@ jobs:
|
|||||||
imageName: minimal-notebook
|
imageName: minimal-notebook
|
||||||
platform: amd64
|
platform: amd64
|
||||||
runsOn: ubuntu-latest
|
runsOn: ubuntu-latest
|
||||||
|
|
||||||
|
amd64-images-tag-push:
|
||||||
|
needs: [test-amd64-base-notebook, test-amd64-minimal-notebook]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
image: [base-notebook, minimal-notebook]
|
||||||
|
uses: ./.github/workflows/sub-tag-push-image.yml
|
||||||
|
with:
|
||||||
|
imageName: ${{ matrix.image }}
|
||||||
|
platform: amd64
|
||||||
|
runsOn: ubuntu-latest
|
||||||
|
53
.github/workflows/sub-tag-push-image.yml
vendored
Normal file
53
.github/workflows/sub-tag-push-image.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
name: Download image artifact from GitHub artifacts, tag it and push to DockerHub
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
imageName:
|
||||||
|
description: "Image name to be pushed"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
platform:
|
||||||
|
description: "Target platform for the built image"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
runsOn:
|
||||||
|
description: "Image to be run on"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-image:
|
||||||
|
runs-on: ${{ inputs.runsOn }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo ⚡️
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Create dev environment 📦
|
||||||
|
uses: ./.github/actions/create-dev-env
|
||||||
|
|
||||||
|
- name: Download built image 📥
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.imageName }}-${{ inputs.platform }}
|
||||||
|
path: /tmp/
|
||||||
|
- name: Load downloaded image to docker 📥
|
||||||
|
run: |
|
||||||
|
docker load --input /tmp/${{ inputs.imageName }}-${{ inputs.platform }}.tar
|
||||||
|
docker image ls -a
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Create tags and manifest 🏷
|
||||||
|
run: python3 -m tagging.tag_image --short-image-name ${{ inputs.imageName }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Login to Docker Hub 🔐
|
||||||
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
|
||||||
|
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # dependabot updates to latest release
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push Images to Docker Hub 📤
|
||||||
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
|
||||||
|
run: docker push --all-tags jupyter/${{ inputs.imageName }}
|
||||||
|
shell: bash
|
@@ -56,7 +56,7 @@ if __name__ == "__main__":
|
|||||||
required=True,
|
required=True,
|
||||||
help="Short image name to apply tags for",
|
help="Short image name to apply tags for",
|
||||||
)
|
)
|
||||||
arg_parser.add_argument("--owner", required=True, help="Owner of the image")
|
arg_parser.add_argument("--owner", default="jupyter", help="Owner of the image")
|
||||||
args = arg_parser.parse_args()
|
args = arg_parser.parse_args()
|
||||||
|
|
||||||
tag_image(args.short_image_name, args.owner)
|
tag_image(args.short_image_name, args.owner)
|
||||||
|
Reference in New Issue
Block a user