2023-06-21 14:48:02 +00:00
|
|
|
name: Server Updater
|
|
|
|
on:
|
|
|
|
schedule:
|
2024-06-03 20:42:42 +00:00
|
|
|
- cron: "0 18 * * MON,THU"
|
|
|
|
workflow_dispatch:
|
2023-06-21 14:48:02 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
2024-12-21 03:24:52 +00:00
|
|
|
if: github.repository == 'kaboomserver/server' || github.event_name == 'workflow_dispatch'
|
2023-06-21 14:48:02 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2024-12-21 03:24:52 +00:00
|
|
|
- name: Update server jar and plugins
|
|
|
|
id: update
|
2023-06-21 14:48:02 +00:00
|
|
|
run: |
|
2024-12-21 03:24:52 +00:00
|
|
|
scripts/update.sh
|
|
|
|
git diff --quiet . || echo "changed=true" >> "$GITHUB_OUTPUT"
|
2023-06-21 14:48:02 +00:00
|
|
|
|
|
|
|
- name: Push changes
|
2024-12-21 03:24:52 +00:00
|
|
|
if: steps.update.outputs.changed == 'true'
|
2023-06-21 14:48:02 +00:00
|
|
|
run: |
|
|
|
|
git config --global user.name 'kaboombot'
|
|
|
|
git config --global user.email '58372747+kaboombot@users.noreply.github.com'
|
|
|
|
git commit -am "Update server and plugins"
|
|
|
|
git push
|