-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.53 KB
/
deploy.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and deploy
on:
push:
branches:
- nginx-gateway
- main
- ci
permissions:
id-token: write
contents: read
env:
AZURE_CORE_OUTPUT: none
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Azure/login@v1
with:
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
#subscription-id: ${{ secrets.SUBSCRIPTION_ID }}
allow-no-subscriptions: true
- name: Docker login to ACR
run: az acr login --name ${{ secrets.REGISTRY_NAME }}
- name: Build and push image
run: |
docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/kiltiskamera/backend:${{ github.sha }} app
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/kiltiskamera/backend:${{ github.sha }}
- name: Deploy from ACR
uses: azure/webapps-deploy@v2
with:
#publish-profile: ${{ secrets.PUBLISH_PROFILE }}
app-name: 'kiltiskamera'
images: ${{ secrets.REGISTRY_LOGIN_SERVER }}/kiltiskamera/backend:${{ github.sha }}
- name: Azure logout
run: |
az logout
#deploy:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v4
# - name: Log in to Azure
# uses: Azure/login@v1
# with:
# client-id: ${{ secrets.CLIENT_ID }}
# tenant-id: ${{ secrets.TENANT_ID }}
# subscription-id: ${{ secrets.SUBSCRIPTION_ID }}
# # allow-no-subscriptions: true
#