- CI: replace GitLab pipeline with Gitea Actions (.gitea/workflows/release.yaml); publish .deb/image/hosted/chart to Gitea registries; gate image+hosted on .deb (needs + registry pre-check) - drop connectone/Nexus; apt now from the Gitea Debian registry - single version source (/VERSION=3.2.8); CI enforces .env/Chart consistency - restructure: build/->packaging/deb, root Dockerfile->packaging/image, hosted/->packaging/hosted, .kube/->charts/freeradius - Helm chart: documented values, DB password via Secret/$ENV, configurable scheduling/persistence; remove plaintext creds and hostPath PV - gitignore *.env_cnf; docs for hosted (RU)/helm/root + agent KB sync Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.1 KiB
Bash
42 lines
1.1 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Uploads built .deb packages to a Gitea Debian package registry.
|
|
#
|
|
# Required env:
|
|
# DEB_USER - Gitea username (token owner)
|
|
# DEB_PASS - Gitea access token with the write:package scope
|
|
#
|
|
# Optional env (defaults target git.ahax86.ru / owner "pub"):
|
|
# DEB_REGISTRY - registry base URL
|
|
# DEB_DISTRIBUTION - apt distribution (default: noble)
|
|
# DEB_COMPONENT - apt component (default: main)
|
|
#
|
|
set -euo pipefail
|
|
|
|
DEB_REGISTRY="${DEB_REGISTRY:-https://git.ahax86.ru/api/packages/pub/debian}"
|
|
DEB_DISTRIBUTION="${DEB_DISTRIBUTION:-noble}"
|
|
DEB_COMPONENT="${DEB_COMPONENT:-main}"
|
|
|
|
if [ -z "${DEB_USER:-}" ] || [ -z "${DEB_PASS:-}" ]; then
|
|
echo "DEB_USER and DEB_PASS must be set" >&2
|
|
exit 1
|
|
fi
|
|
|
|
upload_url="${DEB_REGISTRY}/pool/${DEB_DISTRIBUTION}/${DEB_COMPONENT}/upload"
|
|
|
|
shopt -s nullglob
|
|
debs=(*.deb)
|
|
if [ "${#debs[@]}" -eq 0 ]; then
|
|
echo "No .deb files found to upload" >&2
|
|
exit 1
|
|
fi
|
|
|
|
for file in "${debs[@]}"; do
|
|
echo "Uploading ${file} -> ${upload_url}"
|
|
curl -fsSL --user "${DEB_USER}:${DEB_PASS}" \
|
|
--upload-file "./${file}" \
|
|
"${upload_url}"
|
|
done
|
|
|
|
echo "Uploaded ${#debs[@]} package(s)"
|