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