diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index a7360260..8bcb9be0 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -41,8 +41,7 @@ jobs: if: github.event_name == 'pull_request' run: | git remote update - git checkout ${{ github.head_ref }} - if [ $? -eq 0 ]; then + if git checkout ${{ github.head_ref }}; then echo "Using branch ${{github.head_ref}}" echo "found-branch=1\n" >> $GITHUB_OUTPUT else @@ -56,8 +55,7 @@ jobs: if: github.event_name == 'pull_request' && steps.check-head-ref == 0 run: | git remote update - git checkout ${{ github.base_ref }} - if [ $? -eq 0 ]; then + if git checkout ${{ github.base_ref }}; then echo "Using branch ${{github.base_ref}}" echo "found-branch=1\n" >> $GITHUB_OUTPUT else