Skip to content

Commit 9fefdfa

Browse files
committed
chore: trigger ci
1 parent 45568a7 commit 9fefdfa

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

.github/workflows/chart-release.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,27 @@ jobs:
3232
export GPG_TTY=$(tty)
3333
mkdir -p ~/.gnupg
3434
chmod 700 ~/.gnupg
35-
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
35+
36+
# Configure GPG for CI/batch mode
37+
echo "allow-loopback-pinentry" > ~/.gnupg/gpg.conf
3638
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
39+
echo "trust-model always" >> ~/.gnupg/gpg.conf
40+
echo "batch" >> ~/.gnupg/gpg.conf
41+
echo "no-tty" >> ~/.gnupg/gpg.conf
42+
43+
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
3744
chmod 600 ~/.gnupg/gpg-agent.conf ~/.gnupg/gpg.conf
3845
3946
# Decode and import in one step (suppress base64 warnings)
4047
echo "${{ secrets.HELM_GPG_PRIVATE_KEY }}" | base64 -d 2>/dev/null | gpg --batch --import
4148
42-
# Trust the imported key using the full fingerprint
43-
GPG_KEY_ID="${{ secrets.HELM_GPG_KEY_ID }}"
44-
FULL_FINGERPRINT=$(gpg --list-secret-keys --keyid-format LONG --with-colons | grep fpr | head -1 | cut -d: -f10)
45-
echo "Full fingerprint: $FULL_FINGERPRINT"
46-
echo "$FULL_FINGERPRINT:6:" | gpg --batch --import-ownertrust
47-
48-
# Export to format Helm expects
49-
gpg --batch --export-secret-keys > ~/.gnupg/secring.gpg
50-
51-
# List keys to verify import
49+
# Verify key import (trust-model always is set in gpg.conf, so no ownertrust needed)
5250
echo "Imported GPG keys:"
5351
gpg --list-secret-keys --keyid-format LONG
52+
53+
# Verify we can use the key for signing
54+
GPG_KEY_ID="${{ secrets.HELM_GPG_KEY_ID }}"
55+
echo "Key ID to use for signing: $GPG_KEY_ID"
5456
5557
- name: Create GPG passphrase file
5658
run: |
@@ -68,10 +70,9 @@ jobs:
6870
for chart_dir in charts/*/; do
6971
if [ -f "$chart_dir/Chart.yaml" ]; then
7072
echo "Packaging and signing chart: $chart_dir"
71-
# Package with signing using the KodeKloud method
72-
helm package --sign "$chart_dir" \
73+
# Package with signing - modern approach (no secring needed)
74+
GNUPGHOME=~/.gnupg helm package --sign "$chart_dir" \
7375
--key "$GPG_KEY_ID" \
74-
--keyring ~/.gnupg/secring.gpg \
7576
--passphrase-file gpg-passphrase.txt
7677
fi
7778
done

0 commit comments

Comments
 (0)