Skip to content

Commit

Permalink
Properly handle PGP key
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemnoel committed Sep 9, 2024
1 parent 9090988 commit 789b77a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/paradedb-publish-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ jobs:
PGP_PASSPHRASE: "${{ secrets.PARADEDB_PGP_PASSPHRASE }}"
run: |
IFS=""
echo "$PGP_PRIVATE_KEY" | gpg --dearmor --verbose > $HOME/secring.gpg
echo "$PGP_PASSPHRASE" > $HOME/passphrase.txt
echo "$PGP_PRIVATE_KEY" | gpg --dearmor --verbose > /tmp/secring.gpg
echo "$PGP_PASSPHRASE" > /tmp/passphrase.txt
# Tell chart-releaser-action where to find the key and its passphrase
echo "CR_KEYRING=$HOME/secring.gpg" >> "$GITHUB_ENV"
echo "CR_PASSPHRASE_FILE=$HOME/passphrase.txt" >> "$GITHUB_ENV"
echo "CR_KEYRING=/tmp/secring.gpg" >> "$GITHUB_ENV"
echo "CR_PASSPHRASE_FILE=/tmp/passphrase.txt" >> "$GITHUB_ENV"
- name: Run chart-releaser
uses: helm/[email protected]
Expand All @@ -103,3 +103,7 @@ jobs:
/repos/paradedb/helm-charts/actions/variables/CHART_VERSION_PATCH \
-f name='CHART_VERSION_PATCH' \
-f value='${{ steps.set_versions.outputs.new_chart_version_patch }}'
- name: Securely Delete the PGP Key and Passphrase
if: always()
run: shred --remove=wipesync /tmp/secring.gpg /tmp/passphrase.txt

0 comments on commit 789b77a

Please sign in to comment.