-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86288fa
commit ee76a4a
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Thanks paper: https://github.com/papermc/paper/blob/master/.github/workflows/close_invalid_prs.yml | ||
name: Close invalid PRs | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened ] | ||
|
||
jobs: | ||
run: | ||
if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'master' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: superbrothers/close-pull-request@v3 | ||
id: "master_branch" | ||
if: github.head_ref == 'master' | ||
with: | ||
comment: | | ||
Hi there! :wave: This PR is targeting the `master` branch, which is not allowed. Please target the `develop` branch instead. Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test PR | ||
on: [pull_request] | ||
jobs: | ||
build_pr: | ||
if: github.repository_owner == 'theEvilReaper' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v3 | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
- name: Build with ${{ matrix.os }} | ||
run: | | ||
git config --global user.email "no-reply@github.com" | ||
git config --global user.name "Github Actions" | ||
./gradlew test |