File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2+ # More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+ name : Build and deploy container app to Azure Web App - go-authentication-api
5+
6+ on :
7+ push :
8+ branches :
9+ - dev
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ' ubuntu-latest'
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+
19+ - name : Set up Docker Buildx
20+ uses : docker/setup-buildx-action@v1
21+
22+ - name : Log in to registry
23+ uses : docker/login-action@v1
24+ with :
25+ registry : https://index.docker.io/v1/
26+ username : ${{ secrets.AzureAppService_ContainerUsername_dd70e579d26e400ab97b6e411397c417 }}
27+ password : ${{ secrets.AzureAppService_ContainerPassword_ed0dd44ed9c74b3e8ac1ae9db3bbe429 }}
28+
29+ - name : Build and push container image to registry
30+ uses : docker/build-push-action@v2
31+ with :
32+ push : true
33+ tags : index.docker.io/${{ secrets.AzureAppService_ContainerUsername_dd70e579d26e400ab97b6e411397c417 }}/edmartt/go-auth-api:${{ github.sha }}
34+ file : ./Dockerfile
35+
36+ deploy :
37+ runs-on : ubuntu-latest
38+ needs : build
39+ environment :
40+ name : ' production'
41+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
42+
43+ steps :
44+ - name : Deploy to Azure Web App
45+ id : deploy-to-webapp
46+ uses : azure/webapps-deploy@v2
47+ with :
48+ app-name : ' go-authentication-api'
49+ slot-name : ' production'
50+ publish-profile : ${{ secrets.AzureAppService_PublishProfile_c92362f3b77f4c6787b7820e4cca47c8 }}
51+ images : ' index.docker.io/${{ secrets.AzureAppService_ContainerUsername_dd70e579d26e400ab97b6e411397c417 }}/edmartt/go-auth-api:${{ github.sha }}'
You can’t perform that action at this time.
0 commit comments