better search for length #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.13" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install black | |
# - name: Run formatting checks | |
# run: | | |
# black . --check --exclude "migrations/|manage.py|wsgi.py|asgi.py" | |
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 | |
# deploy: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout private config repo | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: gen-era/canvas-genera | |
# token: ${{ secrets.CANVAS }} | |
# path: canvas-genera | |
# - name: Docker Stack Deploy | |
# uses: cssnr/stack-deploy-action@v1 | |
# with: | |
# name: canvas | |
# file: canvas-genera/docker-compose.yml | |
# user: canvas | |
# host: cnvcanvas.com | |
# ssh_key: ${{ secrets.CANVASFIXCLOUDDEPLOYKEY }} | |
# env_file: ./envfile |