From 9855f3bbf6a9b855fed6a489c307737231cdfa3c Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Wed, 28 Aug 2024 15:42:18 -0600 Subject: [PATCH] clean up determine if tests should run --- .github/workflows/test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4376236dce..00ed9a60ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,8 +46,15 @@ jobs: BRANCH_NAME="${{ github.head_ref }}" RELEASE_VERSION="${BRANCH_NAME:9}" COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s") - if [[ "${{ contains(github.head_ref, 'release--') }}" == "true" && "$COMMIT_MESSAGE" != "azle-bot automated release $RELEASE_VERSION" ]] - then + + IS_RELEASE_CANDIDATE="${{ contains(github.head_ref, 'release--') }}" + + IS_AUTOMATED_RELEASE="false" + if [[ "$COMMIT_MESSAGE" == "azle-bot automated release $RELEASE_VERSION" ]]; then + IS_AUTOMATED_RELEASE="true" + fi + + if [[ "$IS_RELEASE_CANDIDATE" == "true" && "$IS_AUTOMATED_RELEASE" == "false" ]]; then echo "should_run_tests=false" >> "$GITHUB_OUTPUT" else echo "should_run_tests=true" >> "$GITHUB_OUTPUT"