Skip to content

Commit

Permalink
Add checks for main branch to build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Jun 26, 2023
1 parent d05e3df commit 023a934
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/Build_Examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 023a934

Please sign in to comment.