1+ # Docs for the Azure Functions Deploy action: https://github.com/Azure/functions-action
2+ # More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+ name : Build and deploy container app to Azure Functions - wsi-slides-processor
5+
6+ on :
7+ push :
8+ branches :
9+ - main
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read # This is required for actions/checkout
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v2
23+
24+ - name : Log in to container registry
25+ uses : docker/login-action@v2
26+ with :
27+ registry : docker.io/
28+ username : ${{ secrets.AZUREAPPSERVICE_CONTAINERUSERNAME_19013D366BCF40E6929027106F1C5336 }}
29+ password : ${{ secrets.AZUREAPPSERVICE_CONTAINERPASSWORD_AE0D359AD70E4CF6B07D25C1B78AC02E }}
30+
31+ - name : Build and push container image to registry
32+ uses : docker/build-push-action@v3
33+ with :
34+ context : .
35+ push : true
36+ tags : docker.io/${{ secrets.AZUREAPPSERVICE_CONTAINERUSERNAME_19013D366BCF40E6929027106F1C5336 }}/gopalsaini/wsi-slides-processor:${{ github.sha }}
37+ file : ./Dockerfile
38+
39+ deploy :
40+ runs-on : ubuntu-latest
41+ permissions :
42+ id-token : write # This is required for requesting the JWT
43+ contents : read # This is required for actions/checkout
44+
45+ needs : build
46+
47+ steps :
48+
49+ - name : Login to Azure
50+ uses : azure/login@v2
51+ with :
52+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_39D2FD4DBB364854B1F23BCE60488442 }}
53+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_16D0F7C6225048B7AF70779821F86EB6 }}
54+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_2FD172D22C374935B060D6608A344AB4 }}
55+
56+ - name : Deploy to Azure Functions
57+ id : deploy-to-functions
58+ uses : azure/functions-deploy@v2
59+ with :
60+ app-name : ' wsi-slides-processor'
61+ slot-name : ' Production'
62+ images : ' docker.io/${{ secrets.AZUREAPPSERVICE_CONTAINERUSERNAME_19013D366BCF40E6929027106F1C5336 }}/gopalsaini/wsi-slides-processor:${{ github.sha }}'
63+
0 commit comments