File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 11name : deploy
22on :
3+ pull_request :
4+ branches :
5+ - master
6+ paths :
7+ - " src/**"
8+ - " Directory.Build.props"
9+ - " Dockerfile"
10+ - " .github/workflows/deploy.yml"
311 push :
412 branches :
513 - master
3543 uses : docker/build-push-action@v6
3644 with :
3745 context : .
38- push : true
46+ push : ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
3947 load : true
4048 pull : false
4149 no-cache : true
@@ -44,12 +52,14 @@ jobs:
4452 DOCKER_BUILD_SUMMARY : false
4553 DOCKER_BUILD_RECORD_UPLOAD : false
4654 - name : Azure login
55+ if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
4756 uses : azure/login@v2
4857 with :
4958 client-id : ${{ secrets.AZURE_CLIENT_ID }}
5059 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
5160 subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
5261 - name : Deploy
62+ if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
5363 uses : azure/container-apps-deploy-action@v2
5464 with :
5565 resourceGroup : ${{ vars.RESOURCE_GROUP_NAME}}
6070 registryUsername : ${{ secrets.DOCKERHUB_USERNAME }}
6171 registryPassword : ${{ secrets.DOCKERHUB_TOKEN }}
6272 targetPort : ${{ vars.CONTAINER_PORT }}
63- environmentVariables : ASPNETCORE_ENVIRONMENT=Production KEY_VAULT_NAME=${{ secrets.KEY_VAULT_NAME }}
73+ environmentVariables : >
74+ ASPNETCORE_ENVIRONMENT=Production
75+ KEY_VAULT_NAME=${{ secrets.KEY_VAULT_NAME }}
You can’t perform that action at this time.
0 commit comments