From aa95d64125bd7439f5f45448bf8d72ced6cb07cf Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 9 May 2026 22:46:30 +0200 Subject: [PATCH] Normalize registry token secret --- .gitea/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2e8139c..c99fad7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -81,6 +81,7 @@ jobs: shell: bash run: | set -euo pipefail + auth_token="$(printf '%s' "${REGISTRY_TOKEN}" | sed -E 's/^(token|Bearer)[[:space:]]+//; s/[[:space:]]+$//')" package_version="${APP_VERSION}-${GITHUB_SHA::7}" package_dir="package-registry" mkdir -p "${package_dir}/versioned" "${package_dir}/latest" @@ -96,20 +97,20 @@ jobs: cp "${artifact}" "${package_dir}/latest/${LATEST_FILE}" curl --fail-with-body \ - --header "Authorization: token ${REGISTRY_TOKEN}" \ + --header "Authorization: token ${auth_token}" \ --upload-file "${package_dir}/versioned/${versioned_file}" \ "https://git.wilkensxl.de/api/packages/${PACKAGE_OWNER}/generic/${PACKAGE_NAME}/${package_version}/${versioned_file}" curl --silent --show-error \ - --header "Authorization: token ${REGISTRY_TOKEN}" \ + --header "Authorization: token ${auth_token}" \ --request DELETE \ "https://git.wilkensxl.de/api/packages/${PACKAGE_OWNER}/generic/${PACKAGE_NAME}/latest" || true curl --fail-with-body \ - --header "Authorization: token ${REGISTRY_TOKEN}" \ + --header "Authorization: token ${auth_token}" \ --upload-file "${package_dir}/latest/${LATEST_FILE}" \ "https://git.wilkensxl.de/api/packages/${PACKAGE_OWNER}/generic/${PACKAGE_NAME}/latest/${LATEST_FILE}" curl --fail --head \ - --header "Authorization: token ${REGISTRY_TOKEN}" \ + --header "Authorization: token ${auth_token}" \ "https://git.wilkensxl.de/api/packages/${PACKAGE_OWNER}/generic/${PACKAGE_NAME}/latest/${LATEST_FILE}"