From bd1dfc66e6f8ff024543aded2947661105f5e05a Mon Sep 17 00:00:00 2001 From: Matthew Rodusek <7519129+bitwizeshift@users.noreply.github.com> Date: Mon, 11 Dec 2023 23:32:42 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A6=20Limit=20concurrency=20for=20prom?= =?UTF-8?q?otion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The promotion changes currently have the ability to go in out-of-order which would result in an unintuitive failure. This adds a concurrency group to ensure that only 1 can ever run at any given time. --- .github/workflows/promote.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/promote.yaml b/.github/workflows/promote.yaml index 918ec15..4ca3d6b 100644 --- a/.github/workflows/promote.yaml +++ b/.github/workflows/promote.yaml @@ -3,6 +3,12 @@ on: push: branches: [develop] +# Allow only 1 promotion to occur at any given time, to prevent the possibility +# of multiple changes running at the same time and going in out-of-order. +concurrency: + group: promote-master + cancel-in-progress: true + jobs: verify: name: Verify build integrity @@ -44,7 +50,7 @@ jobs: sha1=$(git rev-parse --short HEAD) echo '# ⏩ Accepted changes from `develop` into `master`' >> "${GITHUB_STEP_SUMMARY}" echo '' >> "${GITHUB_STEP_SUMMARY}" - echo '${sha1} is the new HEAD of `master`' >> "${GITHUB_STEP_SUMMARY}" + echo '${{github.sha}} is the new HEAD of `master`' >> "${GITHUB_STEP_SUMMARY}" echo '' >> "${GITHUB_STEP_SUMMARY}" echo '## Summary' >> "${GITHUB_STEP_SUMMARY}" echo '' >> "${GITHUB_STEP_SUMMARY}"