Skip to content

Update tests

Update tests #28

Workflow file for this run

name: Release Charts
on:
push:
branches:
- master
jobs:
release:
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
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: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.4.0
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ vars.VAULT_URL }}
role: ${{ vars.VAULT_ROLE }}
method: jwt
namespace: admin
secrets: |
secret/data/cicd/pgp CR_KEY | CR_KEY;
secret/data/cicd/pgp GPG_KEYRING_BASE64 | GPG_KEYRING_BASE64;
secret/data/cicd/pgp GPG_PASSPHRASE | GPG_PASSPHRASE;
- name: Prepare GPG key #this step is for using exported keys and make your github runner
run: |
gpg_dir=.cr-gpg
mkdir "$gpg_dir"
keyring="$gpg_dir/secring.gpg" #referring keyring to private key of gpg
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring" #storing base64 GPG key into keyring
passphrase_file="$gpg_dir/passphrase"
echo "$GPG_PASSPHRASE" > "$passphrase_file" #storing passphrase data into a file
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV" #saving passphrase into github-environment
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV" #saving private key into github-environemnt
env:
GPG_KEYRING_BASE64: "${{ steps.secrets.outputs.GPG_KEYRING_BASE64 }}" #Referring secrets of github above
GPG_PASSPHRASE: "${{ steps.secrets.outputs.GPG_PASSPHRASE }}"
- name: Add repositories
run: |
for dir in $(ls -d charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_KEY: ${{ steps.secrets.outputs.CR_KEY }} #Key name used while creating key
CR_SIGN: true # set to true to sign images