2023-06-21 14:48:02 +00:00
|
|
|
name: Server Updater
|
|
|
|
on:
|
2024-01-22 16:04:19 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-06-21 14:48:02 +00:00
|
|
|
schedule:
|
2023-11-05 12:13:35 +00:00
|
|
|
- cron: "0 18 * * *"
|
2023-06-21 14:48:02 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
if: github.repository == 'kaboomserver/server'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Fetch server jar
|
|
|
|
run: scripts/fetch_server.sh
|
|
|
|
|
|
|
|
- name: Fetch internal plugins
|
|
|
|
run: scripts/fetch_internal_plugins.sh
|
|
|
|
|
|
|
|
- name: Fetch external plugins
|
|
|
|
run: scripts/fetch_external_plugins.sh
|
|
|
|
|
|
|
|
- name: Update server and plugins
|
|
|
|
run: |
|
|
|
|
cp fetched_server/server.jar .
|
|
|
|
cp fetched_plugins/*.jar plugins/
|
|
|
|
|
|
|
|
- name: Push changes
|
|
|
|
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
|