From 7762f1a7076e622ec354c24539a3b57ce3ec4290 Mon Sep 17 00:00:00 2001 From: Aaron S <94858815+stocaaro@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:53:33 -0500 Subject: [PATCH] fix: restrict to specific staging branch - no fuzzy matching (#12057) --- .github/actions/setup-samples-staging/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-samples-staging/action.yml b/.github/actions/setup-samples-staging/action.yml index bc91886e224..508e36b4ed7 100644 --- a/.github/actions/setup-samples-staging/action.yml +++ b/.github/actions/setup-samples-staging/action.yml @@ -34,7 +34,7 @@ runs: env: BRANCH: ${{ github.ref_name }} run: | - if git ls-remote --exit-code --heads origin $BRANCH >/dev/null 2>&1; then + if git ls-remote origin $BRANCH | grep -q refs/heads/next/$BRANCH$; then # Branch exists, checkout and echo success message git fetch origin $BRANCH git checkout $BRANCH