Fix CI: Use GitHub Actions secrets syntax for ACCESS_TOKEN
This commit is contained in:
parent
9a21dceacf
commit
5000b5e35f
1 changed files with 5 additions and 16 deletions
|
|
@ -392,16 +392,6 @@ jobs:
|
|||
run: |
|
||||
echo "Publishing .deb packages to Forgejo Debian Registry..."
|
||||
|
||||
# Debug: Show what environment variables are available
|
||||
echo "🔍 Available environment variables:"
|
||||
env | grep -i token || echo "No token variables found"
|
||||
env | grep -i access || echo "No access variables found"
|
||||
echo "🔍 Checking specific variables:"
|
||||
echo "ACCESS_TOKEN: ${ACCESS_TOKEN:-'NOT SET'}"
|
||||
echo "FORGEJO_TOKEN: ${FORGEJO_TOKEN:-'NOT SET'}"
|
||||
echo "GITHUB_TOKEN: ${GITHUB_TOKEN:-'NOT SET'}"
|
||||
echo ""
|
||||
|
||||
# .deb files are MANDATORY - fail if none exist
|
||||
if ! ls *.deb >/dev/null 2>&1; then
|
||||
echo "⚠️ No .deb files found in current directory"
|
||||
|
|
@ -449,12 +439,11 @@ jobs:
|
|||
|
||||
echo " Upload URL: $UPLOAD_URL"
|
||||
|
||||
# Upload to Forgejo Debian Registry
|
||||
# Note: This requires authentication - you'll need to set up secrets
|
||||
if [ -n "$ACCESS_TOKEN" ]; then
|
||||
# Upload to Forgejo Debian Registry using GitHub Actions secrets syntax
|
||||
if [ -n "${{ secrets.ACCESS_TOKEN }}" ]; then
|
||||
echo " 🔐 Using authentication token..."
|
||||
UPLOAD_RESULT=$(curl -s -w "%{http_code}" \
|
||||
--user "${FORGEJO_OWNER}:${ACCESS_TOKEN}" \
|
||||
--user "${FORGEJO_OWNER}:${{ secrets.ACCESS_TOKEN }}" \
|
||||
--upload-file "$deb_file" \
|
||||
"$UPLOAD_URL" 2>/dev/null)
|
||||
|
||||
|
|
@ -481,8 +470,8 @@ jobs:
|
|||
;;
|
||||
esac
|
||||
else
|
||||
echo " ⚠️ No ACCESS_TOKEN set - skipping upload"
|
||||
echo " 💡 Set ACCESS_TOKEN secret to enable automatic publishing"
|
||||
echo " ⚠️ No ACCESS_TOKEN secret available - skipping upload"
|
||||
echo " 💡 Set ACCESS_TOKEN secret in repository settings to enable automatic publishing"
|
||||
echo " 📋 Manual upload command:"
|
||||
echo " curl --user your_username:your_token \\"
|
||||
echo " --upload-file $deb_file \\"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue