Skip to content

Update workflow.yaml #49

Update workflow.yaml

Update workflow.yaml #49

Workflow file for this run

name: Workflow
on:
push:
branches:
- main
- dev
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_mini.txt
- name: Check with flake8
run: python -m flake8 crm_yandex/
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: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to DockerHub
uses: docker/build-push-action@v4
with:
push: true
tags: margoloko/ya_crm_backend:latest