diff --git a/.github/workflows/Build_Examples.yml b/.github/workflows/Build_Examples.yml index 850e0e6bfd0..6ddbab8ba76 100644 --- a/.github/workflows/Build_Examples.yml +++ b/.github/workflows/Build_Examples.yml @@ -35,8 +35,13 @@ jobs: ref: '${{ github.event.pull_request.head.ref }}' repository: '${{ github.event.pull_request.head.repo.full_name }}' + - name: Check branch + if: ${{ github.ref == 'refs/heads/main' }} + run: | + echo "RUN_TEST=1 >> $GITHUB_OUTPUT + - name: Check watch files (bash/zsh) - if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}} + if: ${{ github.ref != 'refs/heads/main' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') }} id: check_watch run: | # Determine if we need to run the test @@ -88,7 +93,7 @@ jobs: echo "RUN_TEST=$RUN_TEST" >> $GITHUB_OUTPUT - name: Check watch files (powershell) - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ github.ref != 'refs/heads/main' && matrix.os == 'windows-latest' }} run: | $RUN_TEST = 0 # Always run test on workflow dispatch