Skip to content

Commit

Permalink
fix: validate container
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Oct 3, 2024
1 parent 3531ef3 commit 276b3c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -106,3 +85,4 @@ jobs:
run: |
docker stop hlds
docker rm hlds
docker system prune --all --force
18 changes: 9 additions & 9 deletions container/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 276b3c7

Please sign in to comment.