-
-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (40 loc) · 1.31 KB
/
00-deployment-verification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deployment Verification
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create necessary Docker networks
run: |
docker network create minecraft-server-network || true
- name: Start up services using Docker Compose
run: docker compose -f minecraft-server-docker-compose.yml -p minecraft-server up -d
- name: Modify /etc/hosts for internal routing
run: |
echo "127.0.0.1 minecraft-server.heyvaldemar.net" | sudo tee -a /etc/hosts
- name: Install Python and mcstatus
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install mcstatus
- name: Check Minecraft Server status
run: |
mcstatus minecraft-server.heyvaldemar.net:25565 status
- name: Print Docker Compose services status
run: docker ps
- name: Inspect Network Configuration
run: |
docker network inspect minecraft-server-network
- name: Shutdown Docker Compose services
if: always()
run: docker compose -f minecraft-server-docker-compose.yml -p minecraft-server down