2020-05-13 20:13:27 +00:00
|
|
|
name: Discord Webhook
|
2020-05-13 20:10:45 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'src/**'
|
2020-10-10 17:40:45 +00:00
|
|
|
- '!src/main/resources/languages/**'
|
2020-05-13 20:10:45 +00:00
|
|
|
- 'pom.xml'
|
|
|
|
|
2022-07-12 13:05:15 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-05-13 20:10:45 +00:00
|
|
|
jobs:
|
|
|
|
report:
|
|
|
|
|
2020-08-06 07:52:59 +00:00
|
|
|
name: Discord Webhook
|
2020-05-13 20:10:45 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-10 21:18:36 +00:00
|
|
|
|
|
|
|
## Only run this on the main repo
|
2020-09-06 15:19:17 +00:00
|
|
|
if: github.repository == 'Slimefun/Slimefun4'
|
2020-05-13 20:10:45 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-04-23 11:14:17 +00:00
|
|
|
uses: actions/checkout@v3.0.2
|
2021-07-01 14:47:12 +00:00
|
|
|
|
2022-01-16 13:17:50 +00:00
|
|
|
- name: Set up Java JDK 17
|
2022-09-29 11:50:40 +00:00
|
|
|
uses: actions/setup-java@v3.5.1
|
2020-05-13 20:10:45 +00:00
|
|
|
with:
|
2021-04-05 22:10:16 +00:00
|
|
|
distribution: 'adopt'
|
2022-01-16 13:17:50 +00:00
|
|
|
java-version: '17'
|
2020-10-10 17:37:35 +00:00
|
|
|
java-package: jdk
|
|
|
|
architecture: x64
|
2021-07-01 14:47:12 +00:00
|
|
|
|
|
|
|
- name: Cache Maven packages
|
2022-04-01 12:19:18 +00:00
|
|
|
uses: actions/cache@v3
|
2021-07-01 14:47:12 +00:00
|
|
|
with:
|
|
|
|
path: ~/.m2
|
|
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
|
2020-05-13 20:10:45 +00:00
|
|
|
- name: Run Discord Webhook
|
2021-07-02 12:08:24 +00:00
|
|
|
uses: baked-libs/discord-webhook@1.5.1
|
2020-05-13 20:10:45 +00:00
|
|
|
with:
|
|
|
|
id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
|
|
|
token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|