Run black/flake8 against code base (#243) #51
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: CWYOD Backend Docker Image | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Docker Login | |
uses: docker/login-action@v3.0.0 | |
with: | |
registry: fruoccopublic.azurecr.io | |
username: fruoccopublic | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: | |
docker pull fruoccopublic.azurecr.io/cwyod_backend:latest || true; | |
docker build . --file extensions/docker/Backend.Dockerfile --cache-from fruoccopublic.azurecr.io/cwyod_backend:latest --tag fruoccopublic.azurecr.io/cwyod_backend:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER; | |
docker tag fruoccopublic.azurecr.io/cwyod_backend:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruoccopublic.azurecr.io/cwyod_backend:latest; | |
docker push fruoccopublic.azurecr.io/cwyod_backend:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER; | |
docker push fruoccopublic.azurecr.io/cwyod_backend:latest; | |