From c6915dfe8fe3ac106d2f6e33735da2fbe7e1f1d2 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 28 Nov 2026 20:04:23 -0500 Subject: [PATCH] ci(release): GHCR login reads GHCR_USER as a variable or a secret (#8207) The dry-run dispatch (run 11160) built the release image but showed vars.GHCR_USER empty while secrets.GHCR_TOKEN was set; a real release would have stopped at login. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a744d801..a54aba82 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1002,7 +1002,9 @@ jobs: shell: bash env: VERSION: ${{ steps.name.outputs.version }} - GHCR_USER: ${{ vars.GHCR_USER }} + # GHCR_USER may be set as an Actions variable or as a secret; a + # dispatch on 2026-11-29 found the variable context empty. + GHCR_USER: ${{ vars.GHCR_USER || secrets.GHCR_USER }} GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} run: | set -euo pipefail @@ -1010,7 +1012,7 @@ jobs: echo "::notice::dry run: ${PUBLIC_IMAGE}:${VERSION} and :latest built, nothing pushed" exit 0 fi - if [ -z "${GHCR_USER}" ]; then echo "::error::the Actions variable GHCR_USER is empty"; exit 1; fi + if [ -z "${GHCR_USER}" ]; then echo "::error::GHCR_USER is empty: set it as an Actions variable or secret"; exit 1; fi if [ -z "${GHCR_TOKEN}" ]; then echo "::error::the Actions secret GHCR_TOKEN is empty"; exit 1; fi printf '%s' "${GHCR_TOKEN}" | docker login ghcr.io -u "${GHCR_USER}" --password-stdin if docker manifest inspect "${PUBLIC_IMAGE}:${VERSION}" > /dev/null 2>&1; then