Skip to content

Commit

Permalink
Workflow docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalRu committed Sep 22, 2023
1 parent df9f758 commit afc5d15
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,30 @@ jobs:
POSTGRES_DB: django_db
DB_HOST: 127.0.0.1
DB_PORT: 5432
run: python -m flake8 backend/
run: |
python -m flake8 backend/
build_and_push_to_docker_hub:
name: Push Docker image to DockerHub
runs-on: ubuntu-latest
needs: tests
steps:

- name: Check out the repo
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker
uses: docker/login-action@v2
with:
username: ${{ DOCKER_USERNAME }}
password: ${{ DOCKER_PASSWORD }}

- name: Push to DockerHub
uses: docker/build-push-action@v4
with:
context: ./backend/
push: true
tags: ваш-логин-на-docker-hub/taski_backend:latest

0 comments on commit afc5d15

Please sign in to comment.