From 4bdfaa1458724eaddf0720f9266864a08d380f31 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Thu, 13 May 2021 13:10:08 -0700 Subject: [PATCH] Use fromJSON instead of JSON literal in contains --- .github/workflows/updateProtectedBranch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/updateProtectedBranch.yml b/.github/workflows/updateProtectedBranch.yml index 931c011c8d2a..c7546b4dac11 100644 --- a/.github/workflows/updateProtectedBranch.yml +++ b/.github/workflows/updateProtectedBranch.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Validate target branch - if: ${{ !contains(['main', 'staging', 'production'], github.event.inputs.TARGET_BRANCH) }} + if: ${{ !contains(fromJSON('["main", "staging", "production"]'), github.event.inputs.TARGET_BRANCH) }} run: | echo "Target branch must be one of ['main', 'staging', 'production']" exit 1