You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
stacosys/.github/workflows/docker.yml

26 lines
865 B
YAML

name: docker
3 years ago
on:
push:
3 years ago
branches: [ main ]
3 years ago
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
2 years ago
python-version: "3.11.0"
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2.2
- name: Install dependencies
run: poetry install
- name: Build project
run: poetry build
3 years ago
- name: Build the Docker image
run: |
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io
docker build . --file Dockerfile --tag docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/${{ secrets.DOCKER_HUB_REPOSITORY }}:latest
docker push docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/${{ secrets.DOCKER_HUB_REPOSITORY }}:latest