feat: switch to Generic Package Registry for reliable uploads
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 10m20s

Replace Debian Package Registry with Generic Package Registry for better
reliability and compatibility. Update workflow to use simpler API format
and organize packages by name/version. Update README with new download
instructions and direct package links.
This commit is contained in:
robojerk 2025-07-21 05:48:22 +00:00
parent e2eee01d08
commit 9e4e1646e6
2 changed files with 30 additions and 28 deletions

View file

@ -138,21 +138,27 @@ jobs:
apt-get update -y
apt-get install -y curl
- name: Upload to Debian Package Registry
- name: Upload to Generic Package Registry
run: |
# Upload each .deb package to Forgejo's Debian Package Registry
# Upload each .deb package to Forgejo's Generic Package Registry
for deb_file in release-assets/*.deb; do
if [ -f "$deb_file" ]; then
echo "Uploading $deb_file to Debian Package Registry..."
echo "Uploading $deb_file to Generic Package Registry..."
# Upload to Forgejo's Debian Package Registry using correct API
# PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload
# Using Authorization: token header as per Forgejo documentation
curl -X PUT \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "Content-Type: application/vnd.debian.binary-package" \
# Extract filename for the package
filename=$(basename "$deb_file")
package_name=$(echo "$filename" | cut -d'_' -f1)
version=$(echo "$filename" | cut -d'_' -f2 | cut -d'~' -f1)
echo "Package: $package_name"
echo "Version: $version"
echo "File: $filename"
# Upload to Forgejo's Generic Package Registry
# PUT https://forgejo.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name}
curl --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
--upload-file "$deb_file" \
"https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload"
"https://git.raines.xyz/api/packages/robojerk/generic/$package_name/$version/$filename"
echo "Upload completed for $deb_file"
fi