Skip to content

Commit

Permalink
add support for building notebook docker for previous versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroe committed Oct 10, 2023
1 parent be0bca1 commit bd3eb7b
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/DockerBuild.NotebookImage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ name: DockerBuild.NotebookImage
on:
# allow it to be run on-demand
workflow_dispatch:
inputs:
version:
description: "Version of ArcGIS API for Python to install in the image"
type: string
default: "2.2.0"
python_version:
description: "Python version to base image on"
type: string
default: "3.9"
tag_official:
description: "Whether to tag as latest, official, with versions; value is ignored if not running against master"
type: boolean
default: false

jobs:
build-and-push:
Expand Down Expand Up @@ -31,9 +44,10 @@ jobs:
images: |
ghcr.io/esri/arcgis-python-api-notebook
tags: |
type=raw,value=2.3.0,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
type=schedule,pattern={{date 'YY.MM'}},enable={{is_default_branch}}
type=raw,value=${{ inputs.version }}-python${{ inputs.python_version }}
type=raw,value=${{ inputs.version }},enable=${{ inputs.tag_official && github.ref_name == github.event.repository.default_branch }}
type=raw,value=latest,enable=${{ inputs.tag_official && github.ref_name == github.event.repository.default_branch }}
type=schedule,pattern={{date 'YY.MM'}},enable=${{ inputs.tag_official && github.ref_name == github.event.repository.default_branch }}
type=sha,format=long
- id: docker_build
Expand All @@ -43,6 +57,9 @@ jobs:
# relative path to the place where source code with Dockerfile is located
context: ./docker
file: ./docker/NotebookImage.Dockerfile
build-args: |
python_version=${{ inputs.python_version }}
arcgis_version=${{ inputs.version }}
tags: ${{ steps.meta.outputs.tags }}
provenance: false
platforms: linux/amd64
Expand Down

0 comments on commit bd3eb7b

Please sign in to comment.