diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml
index 9b447f8..66f6e84 100644
--- a/.github/workflows/beta.yml
+++ b/.github/workflows/beta.yml
@@ -13,7 +13,20 @@ jobs:
id-token: write
strategy:
matrix:
- game: [cstrike, valve, czero, dmc, gearbox, ricochet, dod, tfc]
+ game:
+ [
+ cstrike,
+ cstrike-legacy,
+ valve,
+ valve-legacy,
+ czero,
+ czero-legacy,
+ dmc,
+ gearbox,
+ ricochet,
+ dod,
+ tfc,
+ ]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
@@ -36,21 +49,35 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set GAME environment variable 🎮
+ working-directory: ./container
+ run: |
+ GAME=${{ matrix.game }}
+ GAME=${GAME%-legacy}
+ echo "GAME=$GAME" >> $GITHUB_ENV
+
- name: Replace fallback value in Dockerfile and entrypoint.sh
working-directory: ./container
run: |
- sed -i "s/\${GAME:-valve}/\${GAME:-${{ matrix.game }}}/g" Dockerfile
- sed -i "s/\${GAME:-valve}/\${GAME:-${{ matrix.game }}}/g" entrypoint.sh
+ sed -i "s/\${GAME:-valve}/\${GAME:-${{ env.GAME }}}/g" Dockerfile
+ sed -i "s/\${GAME:-valve}/\${GAME:-${{ env.GAME }}}/g" entrypoint.sh
+
+ - name: Configure SteamCMD to install the legacy engine version 🚒
+ if: contains(matrix.game, 'legacy')
+ run: echo "FLAG=-beta steam_legacy" >> $GITHUB_ENV
- name: Build and Push Docker Image to DockerHub 🐳
uses: docker/build-push-action@v6
env:
- GAME: ${{ matrix.game }}
+ GAME: ${{ env.GAME }}
+ FLAG: ${{ env.FLAG }}
with:
context: ./container
push: true
tags: jives/hlds:${{ matrix.game }}-beta
- build-args: GAME=${{ matrix.game }}
+ build-args: |
+ GAME=${{ env.GAME }}
+ FLAG=${{ env.FLAG }}
- name: Set repo owner to lowercase
id: repo_owner
@@ -59,9 +86,12 @@ jobs:
- name: Build and Push Docker Image to GitHub Container Registry 🐳
uses: docker/build-push-action@v6
env:
- GAME: ${{ matrix.game }}
+ GAME: ${{ env.GAME }}
+ FLAG: ${{ env.FLAG }}
with:
context: ./container
push: true
tags: ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/hlds:${{ matrix.game }}-beta
- build-args: GAME=${{ matrix.game }}
+ build-args: |
+ GAME=${{ env.GAME }}
+ FLAG=${{ env.FLAG }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index a3c94e3..b06a282 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -22,6 +22,7 @@ jobs:
WITH_V: true
DEFAULT_BUMP: patch
DRY_RUN: true
+
build:
needs: version
runs-on: ubuntu-latest
@@ -32,7 +33,20 @@ jobs:
id-token: write
strategy:
matrix:
- game: [cstrike, valve, czero, dmc, gearbox, ricochet, dod, tfc]
+ game:
+ [
+ cstrike,
+ cstrike-legacy,
+ valve,
+ valve-legacy,
+ czero,
+ czero-legacy,
+ dmc,
+ gearbox,
+ ricochet,
+ dod,
+ tfc,
+ ]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
@@ -55,23 +69,37 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set GAME environment variable 🎮
+ working-directory: ./container
+ run: |
+ GAME=${{ matrix.game }}
+ GAME=${GAME%-legacy}
+ echo "GAME=$GAME" >> $GITHUB_ENV
+
- name: Replace fallback value in Dockerfile and entrypoint.sh
working-directory: ./container
run: |
- sed -i "s/\${GAME:-valve}/\${GAME:-${{ matrix.game }}}/g" Dockerfile
- sed -i "s/\${GAME:-valve}/\${GAME:-${{ matrix.game }}}/g" entrypoint.sh
+ sed -i "s/\${GAME:-valve}/\${GAME:-${{ env.GAME }}}/g" Dockerfile
+ sed -i "s/\${GAME:-valve}/\${GAME:-${{ env.GAME }}}/g" entrypoint.sh
+
+ - name: Configure SteamCMD to install the legacy engine version 🚒
+ if: contains(matrix.game, 'legacy')
+ run: echo "FLAG=-beta steam_legacy" >> $GITHUB_ENV
- name: Build and Push Docker Image to DockerHub 🐳
uses: docker/build-push-action@v6
env:
- GAME: ${{ matrix.game }}
+ GAME: ${{ env.GAME }}
+ FLAG: ${{ env.FLAG }}
with:
context: ./container
push: true
tags: |
jives/hlds:${{ matrix.game }}
jives/hlds:${{ matrix.game }}-${{ needs.version.outputs.version }}
- build-args: GAME=${{ matrix.game }}
+ build-args: |
+ GAME=${{ env.GAME}}
+ FLAG=${{ env.FLAG }}
- name: Set repo owner to lowercase
id: repo_owner
@@ -81,13 +109,16 @@ jobs:
uses: docker/build-push-action@v6
env:
GAME: ${{ matrix.game }}
+ FLAG: ${{ env.FLAG }}
with:
context: ./container
push: true
tags: |
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/hlds:${{ matrix.game }}
ghcr.io/${{ steps.repo_owner.outputs.repo_owner }}/hlds:${{ matrix.game }}-${{ needs.version.outputs.version }}
- build-args: GAME=${{ matrix.game }}
+ build-args: |
+ GAME=${{ env.GAME }}
+ FLAG=${{ env.FLAG }}
publish:
needs: build
diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml
index 46f93b3..44d7a20 100644
--- a/.github/workflows/sponsors.yml
+++ b/.github/workflows/sponsors.yml
@@ -18,8 +18,9 @@ jobs:
with:
token: ${{ secrets.PAT }}
file: "README.md"
- template: ' '
+ template: ' '
active-only: false
+ include-private: true
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
diff --git a/README.md b/README.md
index 49e27aa..dab71e2 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
Special thank you to all the past and present [GitHub Sponsors](https://github.com/sponsors/JamesIves) 💖.
-
+
## Getting Started 🚀
@@ -41,6 +41,9 @@ docker run -d \
> - `jives/hlds:ricohet` ([Ricochet](https://store.steampowered.com/app/60/Ricochet/))
> - `jives/hlds:dod` ([Day of Defeat](https://store.steampowered.com/app/30/Day_of_Defeat/))
> - `jives/hlds:tfc` ([Team Fortress Classic](https://store.steampowered.com/app/20/Team_Fortress_Classic/))
+> - `jives/hlds:valve-legacy` ([Half-Life Deathmatch](https://store.steampowered.com/app/70/HalfLife/)) ([Pre-25th Anniversary Build](https://www.half-life.com/en/halflife25))
+> - `jives/hlds:cstrike-legacy` ([Counter-Strike](https://store.steampowered.com/app/10/CounterStrike/)) ([Pre-25th Anniversary Build](https://www.half-life.com/en/halflife25))
+> - `jives/hlds:czero-legacy` ([Counter-Strike Condition Zero](https://store.steampowered.com/app/80/CounterStrike_Condition_Zero/)) ([Pre-25th Anniversary Build](https://www.half-life.com/en/halflife25))
>
> Container images are alternatively available on the [GitHub Container Registry](https://github.com/JamesIves/hlds-docker/pkgs/container/hlds).
diff --git a/container/Dockerfile b/container/Dockerfile
index 19d136d..b3ab569 100644
--- a/container/Dockerfile
+++ b/container/Dockerfile
@@ -15,6 +15,12 @@ LABEL org.opencontainers.image.source="https://github.com/jamesives/hlds-docker"
ARG GAME=valve
ENV GAME ${GAME}
+# Sets an environment variable for any additional flag that should be passed to the SteamCMD installer.
+# Default is an empty string. This get replaced when building the image with --build-arg FLAG=
+# For example, you may set this to "-beta steam_legacy".
+ARG FLAG
+ENV FLAG ${FLAG}
+
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends curl rsync file libc6:i386 lib32stdc++6 ca-certificates && \
@@ -32,7 +38,9 @@ WORKDIR /opt/steam
COPY ./hlds.txt /opt/steam
# Replaces $GAME with the requested mod to install in hlds.txt.
+# Additionally replaces $FLAG with any additional FLAG that should be passed to the SteamCMD installer to support betas.
RUN sed -i "s/\$GAME/${GAME}/g" /opt/steam/hlds.txt
+RUN sed -i "s/\$FLAG/${FLAG}/g" /opt/steam/hlds.txt
RUN curl -v -sL media.steampowered.com/client/installer/steamcmd_linux.tar.gz | tar xzvf - && \
file /opt/steam/linux32/steamcmd && \
diff --git a/container/README.md b/container/README.md
index 6f10402..4de22b8 100644
--- a/container/README.md
+++ b/container/README.md
@@ -22,6 +22,8 @@ Before continuing to the following steps, verify that the environment variable i
> - `ricohet` ([Ricochet](https://store.steampowered.com/app/60/Ricochet/))
> - `dod` ([Day of Defeat](https://store.steampowered.com/app/30/Day_of_Defeat/))
> - `tfc` ([Team Fortress Classic](https://store.steampowered.com/app/20/Team_Fortress_Classic/))
+>
+> To install a specific sub version, such as a beta, you can utilize the `FLAG` environment variable to pass arbitrary command flags to Steam CMD. For example, `export FLAG=-beta steam_legacy` can be used to get a [Pre-25th Anniversary build](https://www.half-life.com/en/halflife25) of some titles.
3. Navigate to the `container` folder (where this README file is) and build the image.
diff --git a/container/docker-compose.yml b/container/docker-compose.yml
index 5b5ed16..9049202 100644
--- a/container/docker-compose.yml
+++ b/container/docker-compose.yml
@@ -4,6 +4,7 @@ services:
context: .
args:
- GAME=${GAME}
+ - FLAG=${FLAG}
volumes:
- "./config:/temp/config"
- "./mods:/temp/mods"
@@ -13,4 +14,5 @@ services:
- "26900:2690/udp"
environment:
- GAME=${GAME}
+ - FLAG=${FLAG}
command: +maxplayers 12 +log on
diff --git a/container/hlds.txt b/container/hlds.txt
index 1d00768..a9f237d 100644
--- a/container/hlds.txt
+++ b/container/hlds.txt
@@ -3,7 +3,7 @@
force_install_dir ./hlds
login anonymous
app_set_config 90 mod $GAME
-app_update 90 validate
-app_update 90 validate
-app_update 90 validate
+app_update 90 $FLAG validate
+app_update 90 $FLAG validate
+app_update 90 $FLAG validate
quit
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 713a328..fe4ec87 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -10,6 +10,10 @@ services:
# 🔧 jives/hlds:ricochet (Ricochet)
# 🔧 jives/hlds:dod (Day of Defeat)
# 🔧 jives/hlds:tfc (Team Fortress Classic)
+ #
+ # 🔧 jives/hlds:valve-legacy (Half-Life Deathmatch) (Pre 25th Anniversary Edition)
+ # 🔧 jives/hlds:cstrike-legacy (Counter-Strike) (Pre 25th Anniversary Edition)
+ # 🔧 jives/hlds:czero-legacy (Counter-Strike: Condition Zero) (Pre 25th Anniversary Edition)
image: jives/hlds:cstrike
# 📣 Learn more about these volumes in the advanced setup guides: https://github.com/JamesIves/hlds-docker?tab=readme-ov-file#advanced-setup-%EF%B8%8F
volumes:
@@ -21,7 +25,7 @@ services:
- "26900:2690/udp"
environment:
- GAME=${GAME}
- # 📣 Modify your server startup commands here, you can add more flags as needed (see: https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server),
+ # 📣 Modify your server startup commands here, you can add more FLAG as needed (see: https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server),
# 📣 Remember: Stating map is based on the game, and will likely be different between images.
# 📣 You should also modify the rcon_password value so you can use server admin commands.
command: +log on +rcon_password "changeme" +maxplayers 12 +map cs_italy