Merge pull request #130 from usetrmnl/debug-workflow

Debug workflow
This commit is contained in:
Hossain Khan
2025-06-28 12:26:09 -04:00
committed by GitHub
2 changed files with 60 additions and 3 deletions
-3
View File
@@ -25,9 +25,6 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run F-Droid Tests
run: ./gradlew testFdroidDebugUnitTest
- name: Build F-Droid APK
run: ./gradlew buildFDroid
+60
View File
@@ -225,3 +225,63 @@ jobs:
name: keystore-diagnostic-files
path: keystore-test-artifacts/
retention-days: 1 # Only keep for a day since it contains diagnostic info
- name: Debug Secret Values (Redacted)
run: |
echo "Debugging secret configuration (values redacted for security):"
echo "KEYSTORE_PASSWORD length: $(echo '${{ secrets.KEYSTORE_PASSWORD }}' | wc -c)"
echo "KEY_PASSWORD length: $(echo '${{ secrets.KEY_PASSWORD }}' | wc -c)"
echo "KEY_ALIAS length: $(echo '${{ secrets.KEY_ALIAS }}' | wc -c)"
echo "KEY_ALIAS value: '${{ secrets.KEY_ALIAS }}'"
# Check if any secrets are empty
if [[ -z "${{ secrets.KEYSTORE_PASSWORD }}" ]]; then
echo "❌ KEYSTORE_PASSWORD is empty or not set"
fi
if [[ -z "${{ secrets.KEY_PASSWORD }}" ]]; then
echo "❌ KEY_PASSWORD is empty or not set"
fi
if [[ -z "${{ secrets.KEY_ALIAS }}" ]]; then
echo "❌ KEY_ALIAS is empty or not set"
fi
- name: Test Key Password Specifically
if: always()
run: |
echo "Testing if the key password works for the private key..."
# Try to change the key password (this requires the current key password to work)
keytool -keypasswd -keystore keystore-test/release.keystore \
-storepass "${{ secrets.KEYSTORE_PASSWORD }}" \
-alias "${{ secrets.KEY_ALIAS }}" \
-keypass "${{ secrets.KEY_PASSWORD }}" \
-new "${{ secrets.KEY_PASSWORD }}" > keystore-test/keypasswd.txt 2>&1 || true
if grep -q "Warning" keystore-test/keypasswd.txt || grep -q "keystore password was incorrect" keystore-test/keypasswd.txt; then
echo "❌ Key password is incorrect for the private key"
echo "Key password test output:"
cat keystore-test/keypasswd.txt
else
echo "✅ Key password appears to be correct"
fi
- name: Verify Keystore Entry Type
if: always()
run: |
echo "Checking the exact type of entry in the keystore..."
keytool -list -v -keystore keystore-test/release.keystore \
-storepass "${{ secrets.KEYSTORE_PASSWORD }}" \
-alias "${{ secrets.KEY_ALIAS }}" > keystore-test/entry-details.txt 2>&1 || true
if grep -q "Entry type: PrivateKeyEntry" keystore-test/entry-details.txt; then
echo "✅ Entry is correctly a PrivateKeyEntry"
echo "Key details:"
grep -A 5 -B 5 "Entry type:" keystore-test/entry-details.txt
elif grep -q "Entry type: trustedCertEntry" keystore-test/entry-details.txt; then
echo "❌ Entry is a trustedCertEntry (certificate only, no private key)"
echo "This explains why signing fails - you only have a certificate, not a private key"
else
echo "❓ Could not determine entry type"
echo "Full entry details:"
cat keystore-test/entry-details.txt
fi