You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/azure-preview-env-deploy.yml
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,7 @@ jobs:
188
188
# `main-docker-cache.yml` handles updating the remote cache so we don't pollute it with PR specific code
189
189
cache-to: ''
190
190
build-args: |
191
-
BUILD_SHA=${{ github.sha }}
191
+
BUILD_SHA=${{ env.COMMIT_REF }}
192
192
193
193
# Succeed despite any non-zero exit code (e.g. if there is no deployment to cancel)
194
194
- name: 'Cancel any existing deployments for this PR'
@@ -198,7 +198,16 @@ jobs:
198
198
# Deploy ARM template is idempotent
199
199
# 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)
200
200
- name: Run ARM deploy
201
-
id: deploy
201
+
# This 'if' will be truth, if this workflow is...
202
+
# - run as a workflow_dispatch
203
+
# - run because of a push to main (or gh-readonly-queue/main)
204
+
# - run as a regular pull request
205
+
# But if it's a pull request, *and* for whatever reason, the pull
206
+
# request has "Auto-merge" enabled, don't bother.
207
+
# The idea is that if auto-merge has been abled, by humans or by
208
+
# bots, they have no intention of viewing the deployed preview anyway.
209
+
# This saves time because the PR can merge sooner.
0 commit comments