Added workflow to server
pull / Save and backup minecraft world (push) Failing after 29s
pull / Pull repo to the mods directory (push) Failing after 4s
pull / Restart minecraft server (push) Failing after 15s

This commit is contained in:
LeterZP
2026-06-04 20:20:11 +03:00
parent 61b294af94
commit 1c410b6948
2 changed files with 73 additions and 28 deletions
-28
View File
@@ -1,28 +0,0 @@
name: testing
on:
push:
branches:
- main
jobs:
main:
name: Transport repo to testing directory
runs-on: ubuntu-latest
container:
image: alpine/git
volumes:
- /mnt/host/c/Users/Leter/AppData/Roaming/.minecraft/versions/TeStVISt-server/git-mods/TeStVISt-mods:/workspace/LeterZP/mods
defaults:
run:
working-directory: /workspace/LeterZP/mods
steps:
- name: main
run: |
git fetch origin main
git reset --hard origin/main
+73
View File
@@ -0,0 +1,73 @@
name: pull
on:
push:
branches:
- main
env:
CONTAINER_NAME: mc-neoforge # название контейнера
jobs:
saving:
name: Save and backup minecraft world
runs-on: ubuntu-latest
container:
image: alpine/git
volumes:
- /imp-data/minecraft-backups:/workspace/backups # путь до бэкапов
- /opt/minecraft/TeStVISt-mods-seever:/workspace/project # путь до модов
- /opt/minecraft/data:/workspace/data # путь до данных майнкрафт-сервера
defaults:
run:
working-directory: /workspace/backups
steps:
- name: main
run: |
LAST_BACKUP_TIME=$(date +%F-%T)
mkdir $LAST_BACKUP_TIME
cp -R -t $LAST_BACKUP_TIME ../data/world
cp -t $LAST_BACKUP_TIME ../project/README.md
pulling:
name: Pull repo to the mods directory
runs-on: ubuntu-latest
container:
image: alpine/git
volumes:
- /opt/minecraft/TeStVISt-mods-seever:/workspace/project # путь до модов
defaults:
run:
working-directory: /workspace/project
steps:
- name: main
run: |
git fetch origin main
git reset --hard origin/main
restarting:
name: Restart minecraft server
runs-on: ubuntu-latest
container:
image: docker
steps:
- name: main
run: |
docker exec ${{ env.CONTAINER_NAME }} rcon-cli stop