1
0
mirror of synced 2025-12-30 12:02:01 -05:00

don't deploy preview if auto-merge enabled (#27949)

This commit is contained in:
Peter Bengtsson
2022-05-27 07:19:11 -04:00
committed by GitHub
parent 7f42c91b78
commit f312e634c6

View File

@@ -198,7 +198,16 @@ jobs:
# Deploy ARM template is idempotent
# Note: once the resources exist the image tag must change for a new deployment to occur (the image tag includes workflow run number, run attempt, as well as sha)
- name: Run ARM deploy
id: deploy
# This 'if' will be truth, if this workflow is...
# - run as a workflow_dispatch
# - run because of a push to main (or gh-readonly-queue/main)
# - run as a regular pull request
# But if it's a pull request, *and* for whatever reason, the pull
# request has "Auto-merge" enabled, don't bother.
# The idea is that if auto-merge has been abled, by humans or by
# bots, they have no intention of viewing the deployed preview anyway.
# This saves time because the PR can merge sooner.
if: ${{ !github.event.pull_request.auto_merge }}
uses: azure/arm-deploy@841b12551939c88af8f6df767c24c38a5620fd0d
with:
resourceGroupName: ${{ secrets.PREVIEW_ENV_RESOURCE_GROUP }}