feat: implement proper Debian Package Registry setup
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m55s
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m55s
Replace Generic Package Registry with proper Debian Package Registry using correct API endpoint and authentication. Update workflow to use POST method with form data and proper Bearer token authentication. Update README with professional apt repository setup including GPG key verification and proper installation instructions following Forgejo documentation.
This commit is contained in:
parent
9e4e1646e6
commit
fff0774835
2 changed files with 35 additions and 31 deletions
|
|
@ -138,27 +138,21 @@ jobs:
|
|||
apt-get update -y
|
||||
apt-get install -y curl
|
||||
|
||||
- name: Upload to Generic Package Registry
|
||||
- name: Upload to Debian Package Registry
|
||||
run: |
|
||||
# Upload each .deb package to Forgejo's Generic Package Registry
|
||||
# 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 Generic Package Registry..."
|
||||
echo "Uploading $deb_file to Debian Package Registry..."
|
||||
|
||||
# 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/generic/$package_name/$version/$filename"
|
||||
# Upload to Forgejo's Debian Package Registry using the correct API
|
||||
# POST /api/v1/repos/{owner}/{repo}/packages/debian
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
|
||||
-F "file=@$deb_file" \
|
||||
-F "distribution=noble" \
|
||||
-F "component=main" \
|
||||
"https://git.raines.xyz/api/v1/repos/robojerk/libostree-dev/packages/debian"
|
||||
|
||||
echo "Upload completed for $deb_file"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue