Improve workflow with confirmed working Basic Auth method
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m58s
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 9m58s
This commit is contained in:
parent
7a958f59f0
commit
2e180ec649
1 changed files with 10 additions and 17 deletions
|
|
@ -252,19 +252,15 @@ jobs:
|
|||
run: |
|
||||
echo "=== Attempting Debian Package Registry upload with ACCESS_TOKEN ==="
|
||||
|
||||
# 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 Basic Auth
|
||||
# PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload
|
||||
response=$(curl -s -w "%{http_code}" --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
|
||||
# Use the confirmed working Basic Auth method
|
||||
response=$(curl -s -w "%{http_code}" \
|
||||
--user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
|
||||
--upload-file "$deb_file" \
|
||||
"https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload")
|
||||
|
||||
|
|
@ -283,12 +279,9 @@ jobs:
|
|||
run: |
|
||||
echo "=== Attempting Generic Package Registry upload (fallback) with ACCESS_TOKEN ==="
|
||||
|
||||
# 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 Generic 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)
|
||||
|
|
@ -297,9 +290,9 @@ jobs:
|
|||
echo "Version: $version"
|
||||
echo "File: $filename"
|
||||
|
||||
# Upload to Forgejo's Generic Package Registry using Basic Auth
|
||||
# PUT https://forgejo.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name}
|
||||
response=$(curl -s -w "%{http_code}" --user "robojerk:${{ secrets.ACCESS_TOKEN }}" \
|
||||
# Use the confirmed working Basic Auth method
|
||||
response=$(curl -s -w "%{http_code}" \
|
||||
--user "robojerk:${{ secrets.ACCESS_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