Skip to content

Commit 51eebf6

Browse files
Import GPG Public Key added
Signed-off-by: vimal-java-dev <vimal929@gmail.com>
1 parent 264d811 commit 51eebf6

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/doc-check-linter.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,35 @@ jobs:
5050
if: github.event_name == 'pull_request'
5151
uses: tisonkun/actions-dco@v1.1
5252

53+
- name: Import GPG public keys
54+
run: |
55+
if [ -n "${{ secrets.GPG_PUBLIC_KEY }}" ]; then
56+
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import
57+
echo "✅ Imported GPG_PUBLIC_KEY"
58+
fi
59+
60+
if [ -n "${{ secrets.GPG_PUBLIC_KEY_1 }}" ]; then
61+
echo "${{ secrets.GPG_PUBLIC_KEY_1 }}" | gpg --import
62+
echo "✅ Imported GPG_PUBLIC_KEY_1"
63+
fi
64+
5365
# ---------- Verify latest commit ----------
5466
- name: Verify latest commit signature
55-
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' }}
5667
run: |
5768
LATEST_COMMIT=${{ github.event.pull_request.head.sha }}
5869
echo "🔍 Verifying commit: $LATEST_COMMIT"
5970
60-
# Step 1: Cryptographic verification
6171
if git verify-commit "$LATEST_COMMIT" >/dev/null 2>&1; then
6272
echo "✅ Signature is cryptographically valid"
6373
else
6474
echo "❌ Invalid or missing GPG signature"
6575
exit 1
6676
fi
6777
68-
# Step 2: Extract fingerprint
69-
FINGERPRINT=$(git log -1 --pretty=format:'%GF')
78+
FINGERPRINT=$(git log -1 --pretty=format:'%GF' "$LATEST_COMMIT")
7079
echo "🔑 Signing fingerprint: $FINGERPRINT"
7180
72-
# Step 3: Trusted keys (you + GitHub)
73-
TRUSTED_KEYS="7F4C7CA953E1C09E 4AEE18F83AFDEB23 B5690EEEBB952194"
81+
TRUSTED_KEYS="7F4C7CA953E1C09E D432152833DA3244 4AEE18F83AFDEB23 B5690EEEBB952194"
7482
7583
if echo "$TRUSTED_KEYS" | grep -q "$FINGERPRINT"; then
7684
echo "✅ Trusted signer"

0 commit comments

Comments
 (0)