Skip to content

Updates GitHub Actions at docker-image-web-ui.yml and docker-azure-fu… #1

Updates GitHub Actions at docker-image-web-ui.yml and docker-azure-fu…

Updates GitHub Actions at docker-image-web-ui.yml and docker-azure-fu… #1

name: Docker Image CI
on:
push:
branches:
- master
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Azure Container Registry Login
uses: Azure/docker-login@v1
with:
# Container registry username
username: ${{ secrets.ACR_USERNAME }}
# Container registry password
password: ${{ secrets.ACR_PASSWORD }}
# Container registry server url
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
- uses: actions/checkout@v2
- name: Build the Docker image
run:
cd "GBB.ConversationalKM.WebUI";
docker pull ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:latest || true;
docker build . --file Docker/Dockerfile --cache-from ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:latest --tag ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:latest;
docker push ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push ${{ secrets.ACR_LOGIN_SERVER }}/csci-ui:latest