Skip to content

debug prepare GPG key #15

debug prepare GPG key

debug prepare GPG key #15

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
- feature/FAC-158_gain-more-artifacthub-recognition
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Prepare GPG Key
run: |
set -x
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
echo "${{ secrets.GPG_PASSPHRASE }}" > passphrase.txt
# Run the complex command here and save its output to a file
gpg --list-secret-keys --with-colons | grep 'sec' | cut -d: -f5 > gpg_key_id.txt
echo "$GPG_KEY_ID" > gpg_key_id.txt
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Create .cr.yaml
run: |
cat <<EOF > .cr.yaml
sign: true
# Read the key from the file.
key: "$(cat gpg_key_id.txt)"
passphrase-file: "passphrase.txt"
EOF
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"