Merge remote-tracking branch 'origin' into release #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout Github Action' | |
uses: actions/checkout@v1 | |
- name: 'Login via Azure CLI' | |
uses: Azure/login@v1.1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- uses: azure/docker-login@v1 | |
with: | |
login-server: idiomatically893a.azurecr.io | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build and publish the Docker image | |
run: | | |
docker build . --file Dockerfile -t idiomatically:${{ github.sha }} -t idiomatically893a.azurecr.io/idiomatically:production | |
docker push idiomatically893a.azurecr.io/idiomatically:production | |
- uses: Azure/webapps-deploy@v2 | |
with: | |
app-name: 'Idiomatically' | |
images: 'idiomatically893a.azurecr.io/idiomatically:production' | |
- name: Azure logout | |
run: | | |
az logout |