-
-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (31 loc) · 1016 Bytes
/
dockerimage.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
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