Skip to content

Commit 9667ab7

Browse files
committedJul 2, 2023
feat: update cron schedule and build arguments
- Updated the cron schedule in the docker-publish workflow to run at 3:32 AM every Saturday. - Added a new build argument "SHORTNAME" in the generate-dockerfiles job. - Created a new settings.json file with the interpreter path for Ansible. - Modified the Dockerfile.j2 to use the "SHORTNAME" argument as an environment variable. - Removed unnecessary volumes from the docker-compose.yml file. - Deleted an unused Dockerfile. Closes #123
1 parent 23b9096 commit 9667ab7

File tree

6 files changed

+12
-35
lines changed

6 files changed

+12
-35
lines changed
 

‎.github/workflows/docker-publish.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "requirements.txt"
1010
- "Dockerfile.j2"
1111
schedule:
12-
- cron: "0 0 * * *"
12+
- cron: "32 3 * * 6"
1313

1414
jobs:
1515
generate-dockerfiles:
@@ -71,6 +71,8 @@ jobs:
7171
file: dockerfiles/Dockerfile.${{ matrix.shortname }}
7272
platforms: linux/amd64
7373
push: true
74+
build-args: |
75+
SHORTNAME=${{ matrix.shortname }}
7476
tags: |
7577
gameservermanagers/gameserver:${{ matrix.shortname }}
7678
ghcr.io/gameservermanagers/gameserver:${{ matrix.shortname }}

‎.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ansible.python.interpreterPath": "/bin/python3"
3+
}

‎Dockerfile.j2

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
FROM gameservermanagers/linuxgsm:{{ distro }}
88
LABEL maintainer="LinuxGSM <me@danielgibbs.co.uk>"
9-
ENV GAMESERVER={{ servername }}
9+
ARG SHORTNAME
10+
ENV GAMENAME=${Shortname}server
1011

1112
## Auto install game server requirements
1213
RUN depshortname=$(curl --connect-timeout 10 -s https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/{{ distro }}.csv |awk -v shortname="{{ shortname }}" -F, '$1==shortname {$1=""; print $0}') \

‎docker-compose.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
version: "3.8"
22
services:
33
linuxgsm:
4-
image: gameservermanagers/gameserver:csgo
4+
build:
5+
context: .
6+
dockerfile: dockerfiles/Dockerfile.csgo
57
container_name: csgoserver
68
restart: unless-stopped
7-
volumes:
8-
- /host/path/to/serverfiles:/linuxgsm/serverfiles
9-
- /host/path/to/log:/linuxgsm/log
10-
- /host/path/to/config-lgsm:/linuxgsm/lgsm/config-lgsm
119
ports:
1210
- "27015:27015/tcp"
1311
- "27015:27015/udp"

‎dockerfiles/Dockerfile.

-27
This file was deleted.

‎generate-dockerfiles.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ while read line; do
1717
echo -n "\"shortname\":" >>"shortnamearray.json"
1818
echo -n "\"${shortname}\"" >>"shortnamearray.json"
1919
echo -n "}," >>"shortnamearray.json"
20-
done <serverlist.csv
20+
done < <(tail -n +2 serverlist.csv)
2121
sed -i '$ s/.$//' "shortnamearray.json"
2222
echo -n "]" >>"shortnamearray.json"
2323
echo -n "}" >>"shortnamearray.json"

0 commit comments

Comments
 (0)