-
Notifications
You must be signed in to change notification settings - Fork 50
45 lines (43 loc) · 1.32 KB
/
cd-docker-demo.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Esquio Demo Continous Deployment
on:
push:
tags:
- demo-release-* # Push events to release-*
env:
TAG: 6.0.${{ github.run_id }}
REGISTRY: esquio.azurecr.io
ACR_REPO: esquiodemoapp
jobs:
docker_image_build_publish:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ${{ env.REGISTRY }}/${{ env.ACR_REPO }}
username: ${{ secrets.ESQUIO_DOCKER_USERNAME }}
password: ${{ secrets.ESQUIO_DOCKER_PASSWORD }}
registry: ${{ env.REGISTRY }}
dockerfile: ./build/DemoDockerfile
tags: "latest,${{ env.TAG }}"
docker_azure_deploy:
env:
APP_NAME: esquiodemoapp
needs: docker_image_build_publish
name: DockerDeploy
runs-on: ubuntu-latest
steps:
- uses: azure/login@v1
with:
creds: '${{ secrets.SPN_ESQUIO }}'
- name: Azure App Service Settings
uses: Azure/appservice-settings@v1
with:
app-name: ${{ env.APP_NAME }}
app-settings-json: '${{ secrets.APPSETTINGS_ESQUIO_DEMO_APP }}'
- uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.APP_NAME }}
images: '${{ env.REGISTRY }}/${{ env.ACR_REPO }}:${{ env.TAG }}'