-
Notifications
You must be signed in to change notification settings - Fork 470
30 lines (22 loc) · 989 Bytes
/
Backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Backend Docker Image
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Docker Login
uses: docker/login-action@v2.2.0
with:
registry: fruoccopublic.azurecr.io
username: fruoccopublic
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v3
- name: Build the 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;