server/.github/workflows/main.yml

31 lines
762 B
YAML
Raw Permalink Normal View History

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