File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy to Azure Web App
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+
9+ env :
10+ AZURE_WEBAPP_NAME : " dssa-business"
11+ IMAGE_NAME : " business"
12+ TAG : " latest"
13+
14+ permissions :
15+ id-token : write
16+ contents : read
17+
18+ jobs :
19+ build_and_deploy :
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - name : Checkout repository
24+ uses : actions/checkout@v4
25+
26+ # Log in to Azure via OIDC
27+ - name : Azure Login
28+ uses : azure/login@v2
29+ with :
30+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
31+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
32+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33+
34+ - name : Login to ACR
35+ run : az acr login --name ${{ secrets.ACR_LOGIN_SERVER }}
36+
37+ - name : Build and Push Docker Image
38+ uses : docker/build-push-action@v6
39+ with :
40+ context : .
41+ file : DocuSign.MyBusiness/DocuSign.MyBusiness/Dockerfile
42+ push : true
43+ tags : ${{ secrets.ACR_LOGIN_SERVER }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
44+
45+ - name : Restart Azure Web App
46+ run : |
47+ az webapp restart --name ${{ env.AZURE_WEBAPP_NAME }} --resource-group ${{ secrets.AZURE_RESOURCE_GROUP }}
You can’t perform that action at this time.
0 commit comments