ci(release): GHCR login reads GHCR_USER as a variable or a secret (#8207)
release / android (push) Canceled after 0s
release / govulncheck (push) Canceled after 0s
release / Build signed APK (push) Canceled after 0s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / go (push) Canceled after 10s
release / integration (push) Canceled after 11s
release / web (push) Canceled after 11s
release / android (push) Canceled after 0s
release / govulncheck (push) Canceled after 0s
release / Build signed APK (push) Canceled after 0s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / go (push) Canceled after 10s
release / integration (push) Canceled after 11s
release / web (push) Canceled after 11s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -1002,7 +1002,9 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.name.outputs.version }}
|
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 }}
|
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -1010,7 +1012,7 @@ jobs:
|
|||||||
echo "::notice::dry run: ${PUBLIC_IMAGE}:${VERSION} and :latest built, nothing pushed"
|
echo "::notice::dry run: ${PUBLIC_IMAGE}:${VERSION} and :latest built, nothing pushed"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
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
|
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
|
if docker manifest inspect "${PUBLIC_IMAGE}:${VERSION}" > /dev/null 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user