Skip to content

Workflow docker push #5

Workflow docker push

Workflow docker push #5

Workflow file for this run

name: Main Taski Workflow
on:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.10
env:
POSTGRES_USER: django_user
POSTGRES_PASSWORD: django_password
POSTGRES_DB: django_db
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==6.1.0 flake8-isort==6.1.0
- name: Test with flake8
env:
POSTGRES_USER: django_user
POSTGRES_PASSWORD: django_password
POSTGRES_DB: django_db
DB_HOST: 127.0.0.1
DB_PORT: 5432
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 }}

Check failure on line 63 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Main Taski Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 63, Col: 21): Unrecognized named-value: 'DOCKER_USERNAME'. Located at position 1 within expression: DOCKER_USERNAME .github/workflows/main.yml (Line: 64, Col: 21): Unrecognized named-value: 'DOCKER_PASSWORD'. Located at position 1 within expression: DOCKER_PASSWORD
password: ${{ DOCKER_PASSWORD }}
- name: Push to DockerHub
uses: docker/build-push-action@v4
with:
context: ./backend/
push: true
tags: ваш-логин-на-docker-hub/taski_backend:latest