-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_main_aca_buildimage_pushACR_deployACA.yaml
More file actions
43 lines (37 loc) · 1.12 KB
/
_main_aca_buildimage_pushACR_deployACA.yaml
File metadata and controls
43 lines (37 loc) · 1.12 KB
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
name: Deploy app to Azure Container Apps
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Docker Login'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build the image and push it to ACR
uses: docker/build-push-action@v2
with:
push: true
tags: wimacr.azurecr.io/fastapi_todo:${{ github.sha }}
file: Dockerfile
- name: Build and deploy Container App
uses: azure/container-apps-deploy-action@v1
with:
imageToDeploy: wimacr.azurecr.io/fastapi_todo:${{ github.sha }}
acrName: wimacr
containerAppName: fastapicontainerapp
resourceGroup: Wim-Apps
targetPort: 8000
location: westeurope