Normalize registry token secret
Some checks failed
Build / build (push) Failing after 12m38s
Release Dry Run / release-dry-run (push) Successful in 4s
Codex Template Compliance / template-compliance (push) Successful in 4s

This commit is contained in:
Codex
2026-05-09 22:46:30 +02:00
parent bfbfb9c0e9
commit aa95d64125

View File

@@ -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}"