actions: More GitHub actions (#1678)
* actions: Rename stale action * actions: Use master branch of the action repos * actions: Use OpenOSRS as name * gradle: filter dependency updates * gradle: Add use-latest-versions plugin * actions: Update dependencies * actions: Combine actions * actions: Lint PR title * actions: gradle console plain * actions: Build and test with java matrix * actions: Rane some actions
This commit is contained in:
14
.github/workflows/auto-approve.yml
vendored
14
.github/workflows/auto-approve.yml
vendored
@@ -1,14 +0,0 @@
|
||||
name: RunelitePlus - Auto approve
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
approve:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: hmarr/auto-approve-action@v2.0.0
|
||||
if: github.actor == 'github-actions[bot]'
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
71
.github/workflows/build.yml
vendored
71
.github/workflows/build.yml
vendored
@@ -1,19 +1,78 @@
|
||||
name: RunelitePlus - CI
|
||||
name: OpenOSRS - CI
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
pr-lint:
|
||||
name: Title linter
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: PR title lint
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: seferov/pr-lint-action@master
|
||||
with:
|
||||
title-regex: '^\w+: \w+'
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 9, 11, 12 ]
|
||||
name: Build (Java ${{ matrix.java }})
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Building
|
||||
run: gradlew build --stacktrace -x test -x checkstyleMain --console=plain
|
||||
|
||||
test:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 9, 11, 12 ]
|
||||
name: Test (Java ${{ matrix.java }})
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Testing
|
||||
run: gradlew test --stacktrace --console=plain
|
||||
|
||||
checkstyle:
|
||||
name: Checkstyle
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Building
|
||||
run: gradlew build --stacktrace -x test -x checkstyleMain --console=plain
|
||||
- name: Checking code conventions
|
||||
run: gradlew checkstyleMain --console=plain
|
||||
|
||||
approve:
|
||||
name: Approve
|
||||
needs: [build, test, checkstyle]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Approve pull request
|
||||
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
|
||||
uses: hmarr/auto-approve-action@master
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
19
.github/workflows/checkstyle.yml
vendored
19
.github/workflows/checkstyle.yml
vendored
@@ -1,19 +0,0 @@
|
||||
name: RunelitePlus - Code convention
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
checkstyle:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Checking code conventions
|
||||
run: gradlew checkstyleMain --console=plain
|
||||
42
.github/workflows/gradle.yml
vendored
Normal file
42
.github/workflows/gradle.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: OpenOSRS - Gradle Dependencies
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
|
||||
jobs:
|
||||
update-wrapper:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
- name: Update Gradle Wrapper
|
||||
run: ./gradlew wrapper --gradle-version $(curl -s https://api.github.com/repos/gradle/gradle/releases/latest | grep -Po '"name":.*?[^\\]",' | sed -r 's/[\"name:, ]+//g') --distribution-type all --console=plain
|
||||
- name: Create Gradle wrapper update Pull Request
|
||||
uses: peter-evans/create-pull-request@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.OpenOSRS }}
|
||||
PULL_REQUEST_BRANCH: GRADLE-WRAPPER-UPDATE
|
||||
PULL_REQUEST_TITLE: 'project: Update gradle wrapper'
|
||||
PULL_REQUEST_BODY: This is an auto-generated PR with an updated gradle version
|
||||
COMMIT_MESSAGE: 'project: Update gradle wrapper'
|
||||
|
||||
update-dependencies:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
- name: Update Gradle dependencies
|
||||
run: ./gradlew useLatestVersions --console=plain
|
||||
- name: Create Gradle dependencies update Pull Request
|
||||
uses: peter-evans/create-pull-request@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.OpenOSRS }}
|
||||
PULL_REQUEST_BRANCH: GRADLE-DEPENDENCY-UPDATE
|
||||
PULL_REQUEST_TITLE: 'project: Update gradle dependencies'
|
||||
PULL_REQUEST_BODY: This is an auto-generated PR with an updated gradle dependencies versions
|
||||
COMMIT_MESSAGE: 'project: Update gradle dependencies'
|
||||
25
.github/workflows/gradle_wrapper.yml
vendored
25
.github/workflows/gradle_wrapper.yml
vendored
@@ -1,25 +0,0 @@
|
||||
name: RunelitePlus - Gradle Wrapper
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
|
||||
jobs:
|
||||
update:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
- name: Update Gradle Wrapper
|
||||
run: ./gradlew wrapper --gradle-version $(curl -s https://api.github.com/repos/gradle/gradle/releases/latest | grep -Po '"name":.*?[^\\]",' | sed -r 's/[\"name:, ]+//g') --distribution-type all
|
||||
- name: Create Gradle wrapper update Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.2.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PULL_REQUEST_BRANCH: GRADLE-WRAPPER-UPDATE
|
||||
PULL_REQUEST_TITLE: 'project: Update gradle wrapper'
|
||||
PULL_REQUEST_BODY: This is an auto-generated PR with an updated gradle version
|
||||
COMMIT_MESSAGE: 'project: Update gradle wrapper'
|
||||
39
.github/workflows/scraper.yml
vendored
39
.github/workflows/scraper.yml
vendored
@@ -1,18 +1,17 @@
|
||||
name: RunelitePlus - Scraper
|
||||
name: OpenOSRS - Scraper
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 2,5"
|
||||
|
||||
jobs:
|
||||
scrape:
|
||||
|
||||
scrape-npcs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Make gradlew executable
|
||||
@@ -30,19 +29,41 @@ jobs:
|
||||
- name: Scraping NPC stats
|
||||
run: ./gradlew :wiki-scraper:npcStatsScrape --console=plain
|
||||
- name: Create NPC stats Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.2.0
|
||||
uses: peter-evans/create-pull-request@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.OpenOSRS }}
|
||||
PULL_REQUEST_BRANCH: NPC-UPDATE
|
||||
PULL_REQUEST_TITLE: 'Client: Update NPC stats'
|
||||
PULL_REQUEST_BODY: This is an auto-generated PR with changes from the OSRS wiki
|
||||
COMMIT_MESSAGE: 'Client: Update NPC stats'
|
||||
|
||||
scrape-items:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
- name: Assembling cache client
|
||||
run: ./gradlew :cache-client:assemble --console=plain
|
||||
- name: Assembling scraper
|
||||
run: ./gradlew :wiki-scraper:assemble --console=plain
|
||||
- name: Building cache client
|
||||
run: ./gradlew :cache-client:build --console=plain
|
||||
- name: Building scraper
|
||||
run: ./gradlew :wiki-scraper:build --console=plain
|
||||
- name: Downloading jagex cache
|
||||
run: ./gradlew :cache-client:update --console=plain
|
||||
- name: Scraping item stats
|
||||
run: ./gradlew :wiki-scraper:npcStatsScrape --console=plain
|
||||
- name: Create item stats Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.2.0
|
||||
uses: peter-evans/create-pull-request@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.OpenOSRS }}
|
||||
PULL_REQUEST_BRANCH: ITEM-STATS-UPDATE
|
||||
PULL_REQUEST_TITLE: 'Client: Update item stats'
|
||||
PULL_REQUEST_BODY: This is an auto-generated PR with changes from the OSRS wiki
|
||||
|
||||
5
.github/workflows/stale.yml
vendored
5
.github/workflows/stale.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Mark stale issues and pull requests
|
||||
name: OpenOSRS - Stale issues and PRs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@@ -6,11 +6,10 @@ on:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v1
|
||||
- uses: actions/stale@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'Stale issue message'
|
||||
|
||||
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
@@ -1,19 +0,0 @@
|
||||
name: RunelitePlus - Testing
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Testing
|
||||
run: gradlew test --stacktrace --console=plain
|
||||
Reference in New Issue
Block a user