Skip to content

Commit 8f43801

Browse files
committed
add support for building notebook docker for previous versions
1 parent be0bca1 commit 8f43801

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/DockerBuild.NotebookImage.yaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ name: DockerBuild.NotebookImage
33
on:
44
# allow it to be run on-demand
55
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: "Version of ArcGIS API for Python to install in the image"
9+
type: string
10+
default: "2.2.0"
11+
python_version:
12+
description: "Python version to base image on"
13+
type: string
14+
default: "3.9"
15+
is_latest_release:
16+
description: "Version of ArcGIS API for Python is Latest current release"
17+
type: boolean
18+
default: false
19+
is_default_supported_python:
20+
description: "Python version is default supported version (i.e. python used by Pro and Enterprise)"
21+
type: boolean
22+
default: false
623

724
jobs:
825
build-and-push:
@@ -31,9 +48,10 @@ jobs:
3148
images: |
3249
ghcr.io/esri/arcgis-python-api-notebook
3350
tags: |
34-
type=raw,value=2.3.0,enable={{is_default_branch}}
35-
type=raw,value=latest,enable={{is_default_branch}}
36-
type=schedule,pattern={{date 'YY.MM'}},enable={{is_default_branch}}
51+
type=raw,value=${{ inputs.version }}-python${{ inputs.python_version }}
52+
type=raw,value=${{ inputs.version }},enable=${{ inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
53+
type=raw,value=latest,enable=${{ inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
54+
type=schedule,pattern={{date 'YY.MM'}},enable=${{ inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
3755
type=sha,format=long
3856
3957
- id: docker_build
@@ -43,6 +61,9 @@ jobs:
4361
# relative path to the place where source code with Dockerfile is located
4462
context: ./docker
4563
file: ./docker/NotebookImage.Dockerfile
64+
build-args: |
65+
python_version=${{ inputs.python_version }}
66+
arcgis_version=${{ inputs.version }}
4667
tags: ${{ steps.meta.outputs.tags }}
4768
provenance: false
4869
platforms: linux/amd64

0 commit comments

Comments
 (0)