diff --git a/.github/.teamplate-README.md b/.github/.teamplate-README.md index dba5002..97d9686 100644 --- a/.github/.teamplate-README.md +++ b/.github/.teamplate-README.md @@ -26,11 +26,11 @@ docker run --rm -ti -p 27015:27015/udp $dockerUser/$mod:public ./hlds_run -game ### CMD The default `CMD` for an image is: ```Dockerfile -CMD ["bash", "-c", "./hlds_run -game $mod +ip 0.0.0.0 -port 27016 +map $(head -n 1 ./${MOD}/mapcycle.txt)"]] +CMD ["bash", "-c", "./hlds_run -game $mod +ip 0.0.0.0 -port 27016 +map $(grep -oE '^\\s*(\\w+)' ./${MOD}/mapcycle.txt | head -n 1 | xargs)"]] ``` > [!NOTE] -> `$(head -n 1 ./${MOD}/mapcycle.txt)` - takes the first line (map name) from $mod/mapcycle.txt to enable the server. +> `$(grep -oE '^\\s*(\\w+)' ./${MOD}/mapcycle.txt | head -n 1 | xargs)` - takes the first line (map name) from $mod/mapcycle.txt to enable the server. These values allow you to execute a string of initialization commands before calling the game binary. diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ae6b31a..cc36d0d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,6 +30,18 @@ jobs: - tfc - ricochet - dmc + exclude: + - mod: dod + branch: steam_legacy + - mod: gearbox + branch: steam_legacy + - mod: tfc + branch: steam_legacy + - mod: ricochet + branch: steam_legacy + - mod: dmc + branch: steam_legacy + env: needToPush: ${{ github.ref == 'refs/heads/master' }} @@ -53,6 +65,7 @@ jobs: push: ${{ env.needToPush }} tags: | ${{ vars.DOCKER_USERNAME }}/${{ matrix.mod }}:${{ matrix.branch }} + ${{ matrix.branch == 'public' && format('{0}/{1}:latest', vars.DOCKER_USERNAME, matrix.mod) || null}} build-args: | APPBRANCH=${{ matrix.branch }} MOD=${{ matrix.mod }} diff --git a/README.md b/README.md index 14cb326..0bdd480 100644 --- a/README.md +++ b/README.md @@ -13,20 +13,121 @@ Automated builder of Docker images for Half-Life Dedicated Server (HLDS). The base image is [Debian](https://hub.docker.com/_/debian). ### Images -| Image | Tags | Pulls | Image size | -| - | - | - | - | -| HLDS valve | [`public`, `steam_legacy`](https://hub.docker.com/r/hldsdocker/valve/tags) | [![Docker Pulls](https://img.shields.io/docker/pulls/hldsdocker/valve?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/valve) | [![Docker Image Size](https://img.shields.io/docker/image-size/hldsdocker/valve?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/valve) | -| HLDS cstrike | [`public`, `steam_legacy`](https://hub.docker.com/r/hldsdocker/cstrike/tags) | [![Docker Pulls](https://img.shields.io/docker/pulls/hldsdocker/cstrike?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/cstrike) | [![Docker Image Size](https://img.shields.io/docker/image-size/hldsdocker/cstrike?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/cstrike) | -| HLDS czero | [`public`, `steam_legacy`](https://hub.docker.com/r/hldsdocker/czero/tags) | [![Docker Pulls](https://img.shields.io/docker/pulls/hldsdocker/czero?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/czero) | [![Docker Image Size](https://img.shields.io/docker/image-size/hldsdocker/czero?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/czero) | -| HLDS dod | [`public`](https://hub.docker.com/r/hldsdocker/dod/tags) | [![Docker Pulls](https://img.shields.io/docker/pulls/hldsdocker/dod?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/dod) | [![Docker Image Size](https://img.shields.io/docker/image-size/hldsdocker/dod?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/dod) | -| HLDS gearbox | [`public`](https://hub.docker.com/r/hldsdocker/gearbox/tags) | [![Docker Pulls](https://img.shields.io/docker/pulls/hldsdocker/gearbox?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/gearbox) | [![Docker Image Size](https://img.shields.io/docker/image-size/hldsdocker/gearbox?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/gearbox) | -| HLDS tfc | [`public`](https://hub.docker.com/r/hldsdocker/tfc/tags) | [![Docker Pulls](https://img.shields.io/docker/pulls/hldsdocker/tfc?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/tfc) | [![Docker Image Size](https://img.shields.io/docker/image-size/hldsdocker/tfc?logo=docker&logoColor=blue)](https://hub.docker.com/r/hldsdocker/tfc) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ImageTagsPullsImage size
HLDS valvepublic, + steam_legacyDocker PullsDocker Image Size
HLDS cstrikepublic, + steam_legacyDocker PullsDocker Image Size
HLDS czeropublic, + steam_legacyDocker PullsDocker Image Size
HLDS dodpublicDocker PullsDocker Image Size
HLDS gearboxpublicDocker PullsDocker Image Size
HLDS tfcpublicDocker PullsDocker Image Size
HLDS ricochetpublicDocker PullsDocker Image Size
HLDS dmcpublicDocker PullsDocker Image Size
### Tags -| Name | Description | -| - | - | -| `public` | Latest depots update | -| `steam_legacy` | Pre-25th Anniversary Build | + + + + + + + + + + + + + + + + + +
NameDescription
publicLatest depots update
steam_legacyPre-25th Anniversary Build
### How it works At [00:00 on Sunday](https://github.com/hldsdocker/hlds/blob/67b4583a400a210b87198b923be6c6fa128bc0d4/.github/workflows/CI.yml#L12C3-L13C24) using [GitHub Actions](https://github.com/hldsdocker/hlds/actions), all images are automatically [rebuilt and published](https://github.com/hldsdocker/hlds/blob/67b4583a400a210b87198b923be6c6fa128bc0d4/.github/workflows/CI.yml#L54-L66) to Docker Hub (https://hub.docker.com/u/hldsdocker). @@ -37,11 +138,28 @@ The description for Docker Hub repositories (of each mod) is dynamically generat ### Depots A depot is a logical grouping of files which are all delivered to a customer as a single group. -| Content files | URL | -| - | - | -| Base Goldsrc Shared Content | https://steamdb.info/depot/1/ | -| Counter-Strike Base Content | https://steamdb.info/depot/11/ | -| Condition Zero Base Content | https://steamdb.info/depot/81/ | + + + + + + + + + + + + + + + + + + + + + +
Content filesURL
Base Goldsrc Shared Contenthttps://steamdb.info/depot/1/
Counter-Strike Base Contenthttps://steamdb.info/depot/11/
Condition Zero Base Contenthttps://steamdb.info/depot/81/
[Read more about depots](https://partner.steamgames.com/doc/store/application/depots) in Steamworks documentation. @@ -49,20 +167,54 @@ A depot is a logical grouping of files which are all delivered to a customer as An application can have multiple branches. Other than the "public" branch, there can be other branches. Other branches are often used for storing an older version of the game for people to downgrade to, or for testing new patches/content. These can often be found in the "Betas" tab in the app's properties in the Steam client. Some branches might require a password, and they won't be visible in the drop-down list until the correct password is entered. A list of possible branches and depots can be found here: -| Game | Depots link | -| - | - | -| valve | https://steamdb.info/app/70/depots/ | -| cstrike | https://steamdb.info/app/10/depots/ | -| сzero | https://steamdb.info/app/80/depots/ | + + + + + + + + + + + + + + + + + + + + + +
GameDepots link
valvehttps://steamdb.info/app/70/depots/
cstrikehttps://steamdb.info/app/10/depots/
сzerohttps://steamdb.info/app/80/depots/
[Read more about branches](https://partner.steamgames.com/doc/store/application/branches) in Steamworks documentation. ## Secrets and Variables for GitHub Actions -| Type | Key | Description | -| - | - | - | -| Variable | `DOCKER_USERNAME` | DockerHub user account | -| Secret | `DOCKER_PASSWORD` | DockerHub user password | + + + + + + + + + + + + + + + + + + + + +
TypeKeyDescription
VariableDOCKER_USERNAMEDockerHub user account
SecretDOCKER_PASSWORDDockerHub user password
Read more about [secrets](https://docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values) and [variables](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) in GitHub Docs. \ No newline at end of file