From 276b3c7ac06c288e2e88485272e9761d17dbfbb8 Mon Sep 17 00:00:00 2001 From: James Ives Date: Thu, 3 Oct 2024 11:48:32 -0400 Subject: [PATCH] fix: validate container --- .github/workflows/validate.yml | 22 +--------------------- container/entrypoint.sh | 18 +++++++++--------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1425487..3cd63dc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -43,12 +43,6 @@ jobs: mkdir -p ./config touch ./config/test.cfg - - name: Validate Files Are Present 📂 - run: | - ls - ls ./config - ls ./mods - - name: Run Docker Container 🐳 run: | docker run -d -ti \ @@ -62,21 +56,6 @@ jobs: ${{ env.image_id }} \ "+log on +rcon_password changeme +maxplayers 12 +map cs_italy" - - name: Inspect Container Directories 🕵️‍♂️ - run: | - echo "Listing contents of /temp/config:" - docker exec hlds ls /temp/config - echo "Listing contents of /temp/mods:" - docker exec hlds ls /temp/mods - echo "Listing contents of /opt/steam:" - docker exec hlds ls /opt/steam - echo "Listing contents of /opt/steam/hlds:" - docker exec hlds ls /opt/steam/hlds - echo "Listing contents of /opt/steam/hlds/cstrike:" - docker exec hlds ls /opt/steam/hlds/cstrike - echo "Listing contents of /opt/steam/hlds/decay:" - docker exec hlds ls /opt/steam/hlds/decay - - name: Validate Directory Mappings 📂 run: | # Check if plugin.ini exists in the decay directory @@ -106,3 +85,4 @@ jobs: run: | docker stop hlds docker rm hlds + docker system prune --all --force diff --git a/container/entrypoint.sh b/container/entrypoint.sh index f1ef322..b8342a6 100644 --- a/container/entrypoint.sh +++ b/container/entrypoint.sh @@ -8,16 +8,16 @@ if echo "$@" | grep -qv "+map"; then echo -e "\e[33mWarning: No +map specified in the command. Server will start but may not be joinable.\e[0m" fi -# # Push mods and config files from their temp directories to the server directories. -# if [ -d /temp/mods ] -# then -# rsync --recursive --update --chown=steam:steam /temp/mods/* /opt/steam/hlds -# fi +# Push mods and config files from their temp directories to the server directories. +if [ -d /temp/mods ] +then + rsync --recursive --update --chown=steam:steam /temp/mods/* /opt/steam/hlds +fi -# if [ -d /temp/config ] -# then -# rsync --recursive --update --chown=steam:steam /temp/config/* /opt/steam/hlds/$GAME -# fi +if [ -d /temp/config ] +then + rsync --recursive --update --chown=steam:steam /temp/config/* /opt/steam/hlds/$GAME +fi echo "