Add proper Debian Package Registry upload method with fallback to Generic Registry. I hate this, nothing works.
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 10m1s
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 10m1s
This commit is contained in:
parent
e3bff76a82
commit
f040922759
3 changed files with 238 additions and 1 deletions
|
|
@ -161,8 +161,34 @@ jobs:
|
|||
curl -v -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
|
||||
"https://git.raines.xyz/api/v1/repos/robojerk/libostree-dev/packages" 2>&1
|
||||
|
||||
- name: Upload to Debian Package Registry (Primary)
|
||||
run: |
|
||||
echo "=== Attempting Debian Package Registry upload ==="
|
||||
|
||||
# Upload each .deb package to Forgejo's Debian Package Registry
|
||||
for deb_file in release-assets/*.deb; do
|
||||
if [ -f "$deb_file" ]; then
|
||||
echo "Uploading $deb_file to Debian Package Registry..."
|
||||
|
||||
# Extract filename for the package
|
||||
filename=$(basename "$deb_file")
|
||||
|
||||
echo "File: $filename"
|
||||
|
||||
# Upload to Forgejo's Debian Package Registry using proper endpoint
|
||||
# PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload
|
||||
curl --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
|
||||
--upload-file "$deb_file" \
|
||||
"https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload"
|
||||
|
||||
echo "Debian Package Registry upload completed for $deb_file"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Upload to Generic Package Registry (Fallback)
|
||||
run: |
|
||||
echo "=== Attempting Generic Package Registry upload (fallback) ==="
|
||||
|
||||
# Upload each .deb package to Forgejo's Generic Package Registry
|
||||
for deb_file in release-assets/*.deb; do
|
||||
if [ -f "$deb_file" ]; then
|
||||
|
|
@ -183,6 +209,6 @@ jobs:
|
|||
--upload-file "$deb_file" \
|
||||
"https://git.raines.xyz/api/packages/robojerk/generic/$package_name/$version/$filename"
|
||||
|
||||
echo "Upload completed for $deb_file"
|
||||
echo "Generic Package Registry upload completed for $deb_file"
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue