-
Notifications
You must be signed in to change notification settings - Fork 469
29 lines (22 loc) · 971 Bytes
/
WebApp.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
name: WebApp 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/rag-webapp:latest || true;
docker build . --file docker/WebApp.Dockerfile --cache-from fruoccopublic.azurecr.io/rag-webapp:latest --tag fruoccopublic.azurecr.io/rag-webapp:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag fruoccopublic.azurecr.io/rag-webapp:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruoccopublic.azurecr.io/rag-webapp:latest;
docker push fruoccopublic.azurecr.io/rag-webapp:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push fruoccopublic.azurecr.io/rag-webapp:latest;