GHA workflows are automatically executed on forks where they fail. This change prevents this (only for those workflows that are automatically triggered, e.g.: on push or schedule).
27 lines
498 B
YAML
27 lines
498 B
YAML
name: PR Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: Build branch
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository_owner == 'spring-projects' }}
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: 'maven'
|
|
|
|
- name: Run tests
|
|
run: |
|
|
./mvnw test
|