server/.github/workflows/main.yml
amy c4ca438600
Rewrite server update script (#148)
* refactor!: rewrite update script

* refactor: split common URL logic into download_with_args

* feat: add skip_404 arg to url/zip download type
2024-12-21 05:24:52 +02:00

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