Skip to content

ci: Adds continuous deployment through DockerHub (#114) #42

ci: Adds continuous deployment through DockerHub (#114)

ci: Adds continuous deployment through DockerHub (#114) #42

name: Publish Docker image
on:
push:
branches:
- 'main'
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.0"
- name: Resolve dependencies
run: poetry export -f requirements.txt --without-hashes --output requirements.txt
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: pyronear/pyro-platform
tag_with_ref: true