From 332bdc4e66a9ca234c5478c95544b5a262d2f338 Mon Sep 17 00:00:00 2001 From: Trey Turner Date: Fri, 27 Mar 2026 01:12:21 -0500 Subject: [PATCH 1/4] fix(ci): correct workflow metadata and labels --- .github/actions/build/action.yml | 3 --- .github/actions/publish/action.yml | 5 ----- .github/workflows/build-and-publish.yml | 3 ++- .github/workflows/build-and-test-pr.yml | 1 + 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index f8de6aa..2252a84 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -4,15 +4,12 @@ description: Build a Dockerfile inputs: label: description: "Optional build suffix, e.g. 'dev'" - type: string required: false repos: description: "Newline-separated list of / used to build refs" - type: string required: false upstream-ref: description: "Optional upstream ref override (e.g. 0.34.1); if omitted, the latest upstream release tag is used" - type: string required: false outputs: diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index 7e0f7fa..d68b299 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -3,19 +3,14 @@ description: Publish a Docker image to one or more registries inputs: dockerhub-username: - type: string required: false dockerhub-password: - type: string required: false github-token: - type: string required: true forgejo-token: - type: string required: true refs: - type: string required: true runs: diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 4323c9e..01f3836 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -1,4 +1,5 @@ name: Build and publish dev +run-name: ${{ github.event_name == 'workflow_dispatch' && format('Manually triggered dev build of {0}', inputs.upstream-ref || 'latest upstream release') || 'Automated dev build of latest upstream release' }} on: push: @@ -26,8 +27,8 @@ jobs: label: 'dev' repos: | ghcr.io/treyturner/dcss - docker.io/treyturner/dcss forgejo.treyturner.info/treyturner/dcss + docker.io/treyturner/dcss upstream-ref: ${{ inputs.upstream-ref }} - name: Test diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml index 438f46c..0911ed6 100644 --- a/.github/workflows/build-and-test-pr.yml +++ b/.github/workflows/build-and-test-pr.yml @@ -1,4 +1,5 @@ name: Build and test PR +run-name: 'Build and test #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}' on: pull_request: From 31c4a4c214b44c9c48f5cfa5de516b16ce7de960 Mon Sep 17 00:00:00 2001 From: Trey Turner Date: Fri, 27 Mar 2026 01:12:28 -0500 Subject: [PATCH 2/4] chore(ci): clarify image test output --- .github/actions/test/action.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index e9846cb..2591237 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -21,10 +21,10 @@ runs: echo "Testing crawl-tag file marker..." output="$(docker run --rm --entrypoint cat "${IMAGE_REF}" /app/crawl-tag)" if [[ "${output}" != "${CRAWL_TAG}" ]]; then - echo "❌ CRAWL_TAG mismatch: expected '${CRAWL_TAG}', got '${output}'" + echo "❌ crawl-tag: expected '${CRAWL_TAG}', got '${output}'" exit 1 fi - echo "✅ CRAWL_TAG test passed" + echo "✅ crawl-tag: ${output}" - name: Test crawl binary version shell: bash -euo pipefail {0} @@ -35,8 +35,7 @@ runs: echo "Testing crawl binary version..." output="$(docker run --rm --entrypoint ./crawl "${IMAGE_REF}" -version)" if ! grep -qF "${CRAWL_TAG}" <<< "${output}"; then - echo "❌ Unexpected crawl version:" - echo "${output}" + echo "❌ 'crawl -version': expected '${CRAWL_TAG}', got '${output}'" exit 1 fi - echo "✅ Crawl binary version test passed" + echo "✅ 'crawl -version': ${output}" From 2b867a7cdfcacdec1b7e5afeac51a96772a68edf Mon Sep 17 00:00:00 2001 From: Trey Turner Date: Fri, 27 Mar 2026 01:12:35 -0500 Subject: [PATCH 3/4] feat(ci): promote release tags across registries --- .github/workflows/promote-tag.yml | 56 +++++++++++++------------------ 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/.github/workflows/promote-tag.yml b/.github/workflows/promote-tag.yml index fa49a86..7eba242 100644 --- a/.github/workflows/promote-tag.yml +++ b/.github/workflows/promote-tag.yml @@ -1,14 +1,15 @@ -name: Promote dev version tag to release version tag +name: Promote dev to release +run-name: Promote ${{ inputs.release-version }}-dev to ${{ inputs.release-version }}${{ inputs.promote-latest && ' and latest' || '' }} on: workflow_dispatch: inputs: release-version: - description: "Targeted release version tag (e.g. '0.34.1')" + description: "Targeted release tag (e.g. '0.34.1')" type: string required: true promote-latest: - description: "Also promote to 'latest' tag (only enable if promoting the newest DCSS release)" + description: "Also promote to 'latest' (only enable if promoting the newest DCSS release)" type: boolean required: false default: false @@ -84,37 +85,28 @@ jobs: TARGET_TAGS: ${{ steps.prepare.outputs.tags }} run: | owner_lower=$(printf '%s' "$GH_OWNER" | tr '[:upper:]' '[:lower:]') - # hub_source="${DOCKERHUB_USERNAME}/${PROJECT_NAME}:${SOURCE_TAG}" - ghcr_source="ghcr.io/${owner_lower}/${PROJECT_NAME}:${SOURCE_TAG}" - forgejo_source="forgejo.treyturner.info/${owner_lower}/${PROJECT_NAME}:${SOURCE_TAG}" - mkdir -p tags - printf '%s\n' "$TARGET_TAGS" > tags/list + declare -A repos=( + [ghcr.io]="${owner_lower}/${PROJECT_NAME}" + [forgejo.treyturner.info]="${owner_lower}/${PROJECT_NAME}" + [docker.io]="${DOCKERHUB_USERNAME}/${PROJECT_NAME}" + ) - # echo "Validating source manifest on DockerHub: ${hub_source}" - # docker buildx imagetools inspect "${hub_source}" > /dev/null + for registry in "${!repos[@]}"; do + source="${registry}/${repos[$registry]}:${SOURCE_TAG}" + echo "Validating source manifest on ${registry}: ${source}" + docker buildx imagetools inspect "${source}" > /dev/null + done - echo "Validating source manifest on GHCR: ${ghcr_source}" - docker buildx imagetools inspect "${ghcr_source}" > /dev/null - - echo "Validating source manifest on Forgejo: ${forgejo_source}" - docker buildx imagetools inspect "${forgejo_source}" > /dev/null - - while IFS= read -r tag; do + mapfile -t tags <<< "$TARGET_TAGS" + for tag in "${tags[@]}"; do [ -n "$tag" ] || continue - # echo "Promoting DockerHub tag: ${hub_source} -> ${tag}" - # docker buildx imagetools create \ - # --tag "${DOCKERHUB_USERNAME}/${PROJECT_NAME}:${tag}" \ - # "${hub_source}" - - echo "Promoting GHCR tag: ${ghcr_source} -> ${tag}" - docker buildx imagetools create \ - --tag "ghcr.io/${owner_lower}/${PROJECT_NAME}:${tag}" \ - "${ghcr_source}" - - echo "Promoting Forgejo tag: ${forgejo_source} -> ${tag}" - docker buildx imagetools create \ - --tag "forgejo.treyturner.info/${owner_lower}/${PROJECT_NAME}:${tag}" \ - "${forgejo_source}" - done < tags/list + for registry in "${!repos[@]}"; do + source="${registry}/${repos[$registry]}:${SOURCE_TAG}" + echo "Promoting ${registry} tag: ${source} -> ${tag}" + docker buildx imagetools create \ + --tag "${registry}/${repos[$registry]}:${tag}" \ + "${source}" + done + done From 1c60d45d4b8bec6379749fde40eeef0abfe2b1cb Mon Sep 17 00:00:00 2001 From: Trey Turner Date: Fri, 27 Mar 2026 01:12:37 -0500 Subject: [PATCH 4/4] docs: refresh image publishing and build guidance --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ea1443d..3e0875f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Packages the open source turn-based CRPG [Dungeon Crawl Stone Soup](https://crawl.develz.org/) as a standalone server with webtiles support, allowing you to play in a browser from anywhere. -Images are published to Docker Hub, GitHub Container Registry, and Forgejo: +Images are published to GitHub Container Registry, Forgejo, and Docker Hub: - `ghcr.io/treyturner/dcss` - `forgejo.treyturner.info/treyturner/dcss` @@ -168,10 +168,16 @@ docker run -d \ ## Building from Source -To build the image locally: +To build an image of the latest upstream release: ```sh -docker build --build-arg CRAWL_TAG=0.34.1 -t dcss . +docker build -t dcss . +``` + +or specify a version via the `CRAWL_TAG` build arg, though the build will surely break at some prior version: + +```sh +docker build --build-arg CRAWL_TAG=0.34.0 -t dcss . ``` | Build Argument | Default | Description |