Skip to content

Update docker-image.yml #2

Update docker-image.yml

Update docker-image.yml #2

Workflow file for this run

name: Docker Image CI
on:
workflow_dispatch:
push:
branches:
- main
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@v3
- name: Build the Docker image
run:
docker build . --file WebApp.Dockerfile --tag ${{ secrets.ACR_LOGIN_SERVER }}/pd-skanska-bot-poc:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag ${{ secrets.ACR_LOGIN_SERVER }}/pd-skanska-bot-poc:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER ${{ secrets.ACR_LOGIN_SERVER }}/pd-skanska-bot-poc:latest;
docker push ${{ secrets.ACR_LOGIN_SERVER }}/pd-skanska-bot-poc:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push ${{ secrets.ACR_LOGIN_SERVER }}/pd-skanska-bot-poc:latest;