Skip to content

Revert "isort removed" #8

Revert "isort removed"

Revert "isort removed" #8

Workflow file for this run

name: Docker Build
on:
push:
branches:
- release
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install black isort
- name: Run formatting checks
run: |
black . --check --exclude "migrations/|manage.py|wsgi.py|asgi.py"
isort . --check-only --profile black --skip migrations --skip manage.py --skip wsgi.py --skip asgi.py
- name: Run Django tests
env:
DJANGO_SETTINGS_MODULE: canvas.settings
run: |
python manage.py test
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max