mirror of
https://github.com/kaboomserver/server.git
synced 2024-12-21 23:25:12 +00:00
c4ca438600
* refactor!: rewrite update script * refactor: split common URL logic into download_with_args * feat: add skip_404 arg to url/zip download type
30 lines
762 B
YAML
30 lines
762 B
YAML
name: Server Updater
|
|
on:
|
|
schedule:
|
|
- cron: "0 18 * * MON,THU"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
update:
|
|
if: github.repository == 'kaboomserver/server' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Update server jar and plugins
|
|
id: update
|
|
run: |
|
|
scripts/update.sh
|
|
git diff --quiet . || echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Push changes
|
|
if: steps.update.outputs.changed == 'true'
|
|
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
|