Skip to content

Commit dbf893a

Browse files
committed
add workflow to build Notebook Docker Image
1 parent 5288b29 commit dbf893a

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: DockerBuild.NotebookImage
2+
3+
on:
4+
# allow it to be run on-demand
5+
workflow_dispatch:
6+
7+
jobs:
8+
build-and-push:
9+
name: Build Docker image and push to ghcr.io
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Docker Buildx
17+
id: buildx
18+
uses: docker/setup-buildx-action@v2
19+
20+
- name: Login to Github Packages
21+
uses: docker/login-action@v2
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Docker meta
28+
id: meta
29+
uses: docker/metadata-action@v4
30+
with:
31+
images: |
32+
ghcr.io/esri/arcgis-python-api-notebook
33+
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
38+
39+
- id: docker_build
40+
name: Build image and push to GitHub Container Registry
41+
uses: docker/build-push-action@v4
42+
with:
43+
# relative path to the place where source code with Dockerfile is located
44+
context: ./docker
45+
file: ./docker/NotebookImage.Dockerfile
46+
tags: ${{ steps.meta.outputs.tags }}
47+
provenance: false
48+
platforms: linux/amd64
49+
push: true

0 commit comments

Comments
 (0)