Fix CI: Use ACCESS_TOKEN instead of FORGEJO_TOKEN to match existing secret
- Changed workflow to use ACCESS_TOKEN (your existing secret name) - Removed extra spaces that were causing 'Bad substitution' errors - Should now properly detect and use your ACCESS_TOKEN secret - Fixes the upload step that was failing in Build 76
This commit is contained in:
parent
9118e4133e
commit
5e1b60b469
1 changed files with 8 additions and 6 deletions
|
|
@ -441,15 +441,17 @@ jobs:
|
|||
|
||||
# Upload to Forgejo Debian Registry
|
||||
# Note: This requires authentication - you'll need to set up secrets
|
||||
if [ -n "$ACCESS_TOKEN " ]; then
|
||||
if [ -n "$ACCESS_TOKEN" ]; then
|
||||
echo " 🔐 Using authentication token..."
|
||||
UPLOAD_RESULT=$(curl -s -w "%{http_code}" \
|
||||
--user "${FORGEJO_OWNER}:${ACCESS_TOKEN }" \
|
||||
--user "${FORGEJO_OWNER}:${ACCESS_TOKEN}" \
|
||||
--upload-file "$deb_file" \
|
||||
"$UPLOAD_URL" 2>/dev/null)
|
||||
|
||||
HTTP_CODE="${UPLOAD_RESULT: -3}"
|
||||
RESPONSE_BODY="${UPLOAD_RESULT%???}"
|
||||
# Extract HTTP status code (last 3 characters)
|
||||
HTTP_CODE=$(echo "$UPLOAD_RESULT" | tail -c 4)
|
||||
# Extract response body (everything except last 3 characters)
|
||||
RESPONSE_BODY=$(echo "$UPLOAD_RESULT" | head -c -4)
|
||||
|
||||
case $HTTP_CODE in
|
||||
201)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue