@@ -3,6 +3,23 @@ name: DockerBuild.NotebookImage
3
3
on :
4
4
# allow it to be run on-demand
5
5
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
6
23
7
24
jobs :
8
25
build-and-push :
@@ -31,10 +48,10 @@ jobs:
31
48
images : |
32
49
ghcr.io/esri/arcgis-python-api-notebook
33
50
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 }}
37
- type=sha,format=long
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 }}
38
55
39
56
- id : docker_build
40
57
name : Build image and push to GitHub Container Registry
43
60
# relative path to the place where source code with Dockerfile is located
44
61
context : ./docker
45
62
file : ./docker/NotebookImage.Dockerfile
63
+ build-args : |
64
+ python_version=${{ inputs.python_version }}
65
+ arcgis_version=${{ inputs.version }}
46
66
tags : ${{ steps.meta.outputs.tags }}
47
67
provenance : false
48
68
platforms : linux/amd64
0 commit comments