Skip to content

Commit

Permalink
Merge pull request #131 from griffithlab/v2
Browse files Browse the repository at this point in the history
Make official v2 release + gh action for docker image
  • Loading branch information
korikuzma authored Oct 13, 2022
2 parents 6586f74 + 28e2ae2 commit 37cf664
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/create_docker_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Create new docker image

on:
release:
types: [published]

jobs:
deploy: # https://docs.docker.com/ci-cd/github-actions/
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
secrets: |
civicpy_version=${{ github.event.release.tag_name }}
push: true
tags: griffithlab/civicpy:${{ github.event.release.tag_name }},griffithlab/civicpy:latest
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3.7

RUN --mount=type=secret,id=civicpy_version \
civicpy_version="$(cat /run/secrets/civicpy_version)" \
&& pip install civicpy==${civicpy_version}
2 changes: 1 addition & 1 deletion civicpy/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__url__ = 'http://civicpy.org'
__major__ = '2'
__minor__ = '0'
__patch__ = 'dev0'
__patch__ = '0'
__meta_label__ = ''
__short_version__ = "{}.{}".format(__major__, __minor__)
__version__ = "{}.{}".format(__short_version__, __patch__)
Expand Down

0 comments on commit 37cf664

Please sign in to comment.