Skip to content

Commit

Permalink
Add some basic workflows (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
theEvilReaper committed Oct 21, 2024
1 parent a37a86c commit d7afa60
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
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

0 comments on commit d7afa60

Please sign in to comment.