Skip to content

Commit

Permalink
Improve GPG agent configuration in GitHub Actions workflow for enhanc…
Browse files Browse the repository at this point in the history
…ed signing capability
  • Loading branch information
publi0 committed Feb 25, 2025
1 parent 5eabb9e commit 5272a1f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/apt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,17 @@ jobs:
# Set GPG_KEY_ID for later use
echo "GPG_KEY_ID=$GPG_FINGERPRINT" >> $GITHUB_ENV
# Configure GPG to use the passphrase non-interactively
gpg-agent --daemon --allow-preset-passphrase
# Properly configure GPG agent
gpgconf --kill gpg-agent || true
gpg-connect-agent /bye
# Test key signing to ensure functionality
echo "Testing GPG signing capability..."
echo "test" | gpg --batch --yes --passphrase "${{ secrets.MAGALUBOT_GPG_PASSPHRASE }}" --pinentry-mode loopback -o /dev/null -s
echo "test" | gpg --batch --yes --passphrase "${{ secrets.MAGALUBOT_GPG_PASSPHRASE }}" --pinentry-mode loopback -s -o /dev/null
# Verify the GPG agent is properly configured for aptly
echo "export GPG_TTY=$(tty)" >> ~/.bashrc
echo "export GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Create and Update Aptly Repository
run: |
Expand Down

0 comments on commit 5272a1f

Please sign in to comment.