Switch to automatic FORGEJO_TOKEN for package uploads
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m43s
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m43s
This commit is contained in:
parent
f040922759
commit
1b8166c26c
2 changed files with 10 additions and 10 deletions
|
|
@ -140,30 +140,30 @@ jobs:
|
|||
|
||||
- name: Test API endpoints
|
||||
run: |
|
||||
echo "=== Testing Forgejo API endpoints with updated token ==="
|
||||
echo "=== Testing Forgejo API endpoints with automatic token ==="
|
||||
|
||||
# Test 1: Check if the Debian Package Registry endpoint exists
|
||||
echo "Testing Debian Package Registry endpoint..."
|
||||
curl -v -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
|
||||
curl -v -H "Authorization: Bearer ${{ secrets.FORGEJO_TOKEN }}" \
|
||||
"https://git.raines.xyz/api/v1/repos/robojerk/libostree-dev/packages/debian" 2>&1
|
||||
|
||||
echo ""
|
||||
echo "=== Testing Generic Package Registry endpoint ==="
|
||||
|
||||
# Test 2: Check if the Generic Package Registry endpoint exists
|
||||
curl -v -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
|
||||
curl -v -H "Authorization: Bearer ${{ secrets.FORGEJO_TOKEN }}" \
|
||||
"https://git.raines.xyz/api/v1/packages/robojerk/generic" 2>&1
|
||||
|
||||
echo ""
|
||||
echo "=== Testing repository packages endpoint ==="
|
||||
|
||||
# Test 3: Check repository packages endpoint
|
||||
curl -v -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
|
||||
curl -v -H "Authorization: Bearer ${{ secrets.FORGEJO_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 ==="
|
||||
echo "=== Attempting Debian Package Registry upload with automatic token ==="
|
||||
|
||||
# Upload each .deb package to Forgejo's Debian Package Registry
|
||||
for deb_file in release-assets/*.deb; do
|
||||
|
|
@ -175,9 +175,9 @@ jobs:
|
|||
|
||||
echo "File: $filename"
|
||||
|
||||
# Upload to Forgejo's Debian Package Registry using proper endpoint
|
||||
# Upload to Forgejo's Debian Package Registry using automatic token
|
||||
# PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload
|
||||
curl --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
|
||||
curl -H "Authorization: Bearer ${{ secrets.FORGEJO_TOKEN }}" \
|
||||
--upload-file "$deb_file" \
|
||||
"https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload"
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ jobs:
|
|||
|
||||
- name: Upload to Generic Package Registry (Fallback)
|
||||
run: |
|
||||
echo "=== Attempting Generic Package Registry upload (fallback) ==="
|
||||
echo "=== Attempting Generic Package Registry upload (fallback) with automatic token ==="
|
||||
|
||||
# Upload each .deb package to Forgejo's Generic Package Registry
|
||||
for deb_file in release-assets/*.deb; do
|
||||
|
|
@ -203,9 +203,9 @@ jobs:
|
|||
echo "Version: $version"
|
||||
echo "File: $filename"
|
||||
|
||||
# Upload to Forgejo's Generic Package Registry
|
||||
# Upload to Forgejo's Generic Package Registry using automatic token
|
||||
# PUT https://forgejo.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name}
|
||||
curl --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
|
||||
curl -H "Authorization: Bearer ${{ secrets.FORGEJO_TOKEN }}" \
|
||||
--upload-file "$deb_file" \
|
||||
"https://git.raines.xyz/api/packages/robojerk/generic/$package_name/$version/$filename"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue