diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 000000000..597a64143 --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,23 @@ +name: Build PR + +on: [ pull_request ] + +jobs: + build_pr: + if: github.repository_owner == 'IntellectualSites' + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + - name: Build on ${{ matrix.os }} + run: ./gradlew clean build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d504a371..444f5a958 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,12 @@ -name: build - -on: [pull_request, push] +name: Build +on: + push: + branches: + - main jobs: build: - if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} + if: github.repository_owner == 'IntellectualSites' runs-on: ubuntu-latest steps: - name: Checkout Repository diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c4d6206c6..d5fa715d1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,8 +1,6 @@ name: "CodeQL" on: - push: - branches: [ main ] pull_request: # The branches below must be a subset of the branches above branches: [ main ]