Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: miniCRM workflow

on: [push]
on:
push:
branches: [ dev ]

jobs:
lint:
Expand All @@ -24,12 +26,34 @@ jobs:
run: |
python -m black . --check

- name: Test with flake8-isort(check only)
- name: Test with isort(check only)
run: |
python -m isort . --check-only

- name: Test with flake8
run: |
flake8 . --count --statistics --show-source

build_and_push_to_docker_hub:
name: miniCRM Push Docker Image to Docker Hub
runs-on: ubuntu-latest
needs: lint
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: |
dmsn/minicrm:dev
dmsn/minicrm:dev-${{ github.sha::7 }}
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
env_file:
- ./.env
backend:
build: .
image: dmsn/minicrm:latest
restart: always
depends_on:
- db
Expand Down