Skip to content

Backend Docker Image #41

Backend Docker Image

Backend Docker Image #41

name: Backend Docker Image
on:
workflow_run:
workflows: [Tests]
types: [completed]
branches: [main]
jobs:
docker-build-backend:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Docker Login
uses: docker/login-action@v3
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v4
- name: Build the Backend Docker image
run:
docker pull fruoccopublic.azurecr.io/rag-backend:latest || true;
docker build . --file docker/Backend.Dockerfile --cache-from fruoccopublic.azurecr.io/rag-backend:latest --tag fruoccopublic.azurecr.io/rag-backend:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag fruoccopublic.azurecr.io/rag-backend:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruoccopublic.azurecr.io/rag-backend:latest;
docker push fruoccopublic.azurecr.io/rag-backend:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push fruoccopublic.azurecr.io/rag-backend:latest;