File tree 1 file changed +47
-0
lines changed 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Trigger auto deployment for album-api
2
+
3
+ # When this action will be executed
4
+ on :
5
+ # Automatically trigger it when detected changes in repo
6
+ push :
7
+ branches :
8
+ [ main ]
9
+ paths :
10
+ - ' **'
11
+ - ' .github/workflows/album-api-AutoDeployTrigger-8479c841-7cbd-4e12-9e59-5c92411e5b0e.yml'
12
+
13
+ # Allow manual trigger
14
+ workflow_dispatch :
15
+
16
+ jobs :
17
+ build-and-deploy :
18
+ runs-on : ubuntu-latest
19
+ permissions :
20
+ id-token : write # This is required for requesting the OIDC JWT Token
21
+ contents : read # Required when GH token is used to authenticate with private repo
22
+
23
+ steps :
24
+ - name : Checkout to the branch
25
+ uses : actions/checkout@v2
26
+
27
+ - name : Azure Login
28
+ uses : azure/login@v1
29
+ with :
30
+ client-id : ${{ secrets.ALBUMAPI_AZURE_CLIENT_ID }}
31
+ tenant-id : ${{ secrets.ALBUMAPI_AZURE_TENANT_ID }}
32
+ subscription-id : ${{ secrets.ALBUMAPI_AZURE_SUBSCRIPTION_ID }}
33
+
34
+ - name : Build and push container image to registry
35
+ uses : azure/container-apps-deploy-action@v2
36
+ with :
37
+ appSourcePath : ${{ github.workspace }}
38
+ registryUrl : myapi20240815184609.azurecr.io
39
+ registryUsername : ${{ secrets.ALBUMAPI_REGISTRY_USERNAME }}
40
+ registryPassword : ${{ secrets.ALBUMAPI_REGISTRY_PASSWORD }}
41
+ containerAppName : album-api
42
+ resourceGroup : my-containerapp-rg
43
+ imageToBuild : myapi20240815184609.azurecr.io/album-api:${{ github.sha }}
44
+ _buildArgumentsKey_ : |
45
+ _buildArgumentsValues_
46
+
47
+
You can’t perform that action at this time.
0 commit comments