Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some basic workflows #36

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/close_invalid_prs.yml
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!
24 changes: 24 additions & 0 deletions .github/workflows/test-pr.yml
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
Loading