From e3438a8d597289ac5023310af8f5bda1dc136c51 Mon Sep 17 00:00:00 2001 From: kaboom <58372747+kaboombot@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:48:02 +0300 Subject: [PATCH] Automatically update server and plugins every day --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..fc9bce1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Server Updater +on: + schedule: + - cron: "0 12 * * *" + +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 diff --git a/.gitignore b/.gitignore index 9544567..247d851 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +fetched_*/ scripts/fetched_*/