Skip to content

Commit 87fc00b

Browse files
committed
Added ECR repo and command to build and push docker image on merge into main
1 parent ffe89b8 commit 87fc00b

4 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and deploy digital-land-python
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
python-version: 3.8
17+
- name: Configure AWS Credentials
18+
uses: aws-actions/configure-aws-credentials@v1
19+
with:
20+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
21+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22+
aws-region: eu-west-2
23+
- name: Deploy
24+
run: |
25+
make docker-build
26+
make docker-push
27+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ collection
1919
specification
2020
ssl.pem
2121
var
22+
23+
.envrc
24+
.direnv

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Development requires Python 3.6.2 or later, we recommend using a [virtual enviro
4141
make
4242
python -m digital-land --help
4343

44+
There is also a docker image available on public ECR
45+
46+
```
47+
docker run public.ecr.aws/l6z6v3j6/digital-land-python:latest digital-land
48+
```
49+
4450
## Release procedure
4551

4652
Update the tagged version number:

makerules/python.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
PIP_INSTALL_PACKAGE=[test]
2+
ECR_REPO=public.ecr.aws/l6z6v3j6/
23

34
all:: lint test coverage
45

@@ -41,3 +42,9 @@ upload:: dist
4142

4243
makerules::
4344
curl -qfsL '$(SOURCE_URL)/makerules/main/python.mk' > makerules/python.mk
45+
46+
docker-build::
47+
docker build . -t $(ECR_REPO)digital-land-python
48+
49+
docker-push::
50+
docker push $(ECR_REPO)digital-land-python

0 commit comments

Comments
 (0)