Skip to content

Commit c940ded

Browse files
Update release workflows to use the new GPG private key (1.3.x branch) (#3400)
* Update release workflows to use the new GPG private key * Fix helm unittest for GH action (#3279) --------- Co-authored-by: Yong Zheng <yongzheng0809@gmail.com>
1 parent 308134d commit c940ded

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

.github/workflows/helm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
7777
- name: Run Helm unit tests
7878
run: |
79-
helm plugin install https://github.com/helm-unittest/helm-unittest.git || true
79+
# Pin version to 1.0.2 due to https://github.com/helm-unittest/helm-unittest/issues/790
80+
helm plugin install https://github.com/helm-unittest/helm-unittest.git --version 1.0.2 || true
8081
helm unittest helm/polaris
8182
8283
- name: Run chart-testing (lint)

.github/workflows/release-3-build-and-publish-artifacts.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ jobs:
141141
- name: Import GPG key
142142
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
143143
with:
144-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
145-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
144+
gpg_private_key: ${{ secrets.POLARIS_GPG_PRIVATE_KEY }}
146145
git_user_signingkey: true
147146
git_commit_gpgsign: true
148147

@@ -336,28 +335,22 @@ jobs:
336335
- name: Import GPG key
337336
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
338337
with:
339-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
340-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
338+
gpg_private_key: ${{ secrets.POLARIS_GPG_PRIVATE_KEY }}
341339
git_user_signingkey: true
342340
git_commit_gpgsign: true
343341

344342
- name: Create Helm package
345-
env:
346-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
347343
run: |
348-
echo "::add-mask::$GPG_PASSPHRASE"
349-
350344
source "${LIBS_DIR}/_exec.sh"
351345
352346
# Make sure these files are always deleted
353-
trap "rm -f /tmp/secring.gpg /tmp/pubring.gpg /tmp/passphrase" EXIT
347+
trap "rm -f /tmp/secring.gpg /tmp/pubring.gpg" EXIT
354348
355-
echo "$GPG_PASSPHRASE" > /tmp/passphrase
356-
gpg --batch --pinentry-mode loopback --passphrase-file /tmp/passphrase --export-secret-keys > /tmp/secring.gpg
349+
gpg --batch --pinentry-mode loopback --export-secret-keys > /tmp/secring.gpg
357350
gpg --batch --pinentry-mode loopback --export > /tmp/pubring.gpg
358351
359352
exec_process cd helm
360-
exec_process helm package polaris --sign --key "." --keyring /tmp/secring.gpg --passphrase-file /tmp/passphrase
353+
exec_process helm package polaris --sign --key "." --keyring /tmp/secring.gpg
361354
exec_process helm verify polaris-${version_without_rc}.tgz --keyring /tmp/pubring.gpg
362355
363356
calculate_sha512 polaris-${version_without_rc}.tgz

0 commit comments

Comments
 (0)