Skip to content

Commit

Permalink
test: add health check
Browse files Browse the repository at this point in the history
  • Loading branch information
xMikux committed Sep 13, 2024
1 parent ecdee48 commit a62fb53
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 22 deletions.
14 changes: 10 additions & 4 deletions .github/compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
version: "3"

services:
builder:
image: ghcr.io/xmikux/itemsadder:latest
server:
container_name: itemsadder_server
image: ghcr.io/xmikux/itemsadder-image:latest
volumes:
# - type: bind
# source: ${PWD}/external
# target: /app/external
- type: bind
source: ${PWD}/Resourcepack/contents
target: /app/plugins/ItemsAdder/contents
- type: bind
source: ${PWD}/output
target: /app/plugins/ItemsAdder/output
ports:
- 25575:25575
environment:
- RCON_ENV
56 changes: 38 additions & 18 deletions .github/workflows/resuable_ia.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
name: Makeup IA Resourcepack

on:
workflow_call: {}
workflow_call:
secrets:
S3_ACCESS_KEY:
required: true
S3_SECRET_KEY:
required: true
S3_BUCKET_NAME:
required: true

jobs:
ia_container:
ia_resourcepack:
name: Generate IA Resourcepack
runs-on: ubuntu-latest
container:
image: ghcr.io/xmikux/itemsadder-image:latest
env:
RCON_ENV: ${{ secrets.RCON_PASSWORD }}
ports:
- 25575:25575
steps:
- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

- name: Checkout repo
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check container
# - name: Setup - S3cmd Cli Tool
# uses: s3-actions/[email protected]
# with:
# provider: "vultr"
# region: "sgp1"
# access_key: ${{ secrets.S3_ACCESS_KEY }}
# secret_key: ${{ secrets.S3_SECRET_KEY }}

# - name: S3 - Download Plugins
# run: |
# s3cmd get s3://${{ secrets.S3_BUCKET_NAME }}/itemsaddres maps-cache-data.tar.xz

- name: Setup - IA Minecraft Server
run: |
ls -alh
pwd
ls -alh
docker -h
wget -h
mkdir output
docker compose -f .github/compose/docker-compose.yml up
env:
RCON_ENV: ${{ secrets.RCON_PASSWORD }}

- name: Check services healthiness
uses: thegabriele97/dockercompose-health-action@main
with:
filename: ".github/compose/docker-compose.yml"
timeout: "60"
workdir: ".github/compose"

0 comments on commit a62fb53

Please sign in to comment.