Skip to content

Commit 6346518

Browse files
authored
Load gpg key without external action (#4784)
* Load gpg key ourselves * Update release-make.yml
1 parent 480c8e8 commit 6346518

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/release-make.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,18 @@ jobs:
5858
- name: Load GPG key
5959
id: gpg
6060
if: inputs.gpg-fingerprint
61-
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6
62-
with:
63-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
64-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
65-
fingerprint: ${{ inputs.gpg-fingerprint }}
61+
env:
62+
PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
63+
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
64+
FINGERPRINT: ${{ inputs.gpg-fingerprint }}
65+
run: |
66+
# Import the private key from the GH secrets
67+
echo "$PRIVATE_KEY" | gpg --import --batch --passphrase "$PASSPHRASE" -
68+
# For debugging, show the contents of the keyring
69+
gpg --list-keys --list-options show-unusable-subkeys=yes --with-subkey-fingerprint $FINGERPRINT
70+
# Extract the email address
71+
EMAIL=$(gpg --list-keys --with-colons $FINGERPRINT | head -n1 | awk -F: '$1=="uid" {match($10, /<([^>]+)>/, a); print a[1]}')
72+
echo "email=$EMAIL" >> $GITHUB_OUTPUT
6673
6774
- name: Get draft release
6875
id: draft-release

0 commit comments

Comments
 (0)