check kpow-annual deployment #45
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Charts | |
| on: [push] | |
| # on: | |
| # push: | |
| # branches: | |
| # - main | |
| 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: Install Helm | |
| uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5 | |
| with: | |
| version: v3.8.1 | |
| - name: Prepare GPG key # This step is for using exported keys and make your github runner | |
| run: | | |
| # Create a folder to store files | |
| gpg_dir=.cr-gpg | |
| mkdir "$gpg_dir" | |
| # Refer keyring to private key of gpg | |
| keyring="$gpg_dir/secring.gpg" | |
| # Store base64 GPG key into keyring | |
| base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring" | |
| # Store passphrase data into a file | |
| passphrase_file="$gpg_dir/passphrase" | |
| echo "$GPG_PASSPHRASE" > "$passphrase_file" | |
| # Save passphrase into github-environment | |
| echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV" | |
| # Save private key into github-environemnt | |
| echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV" | |
| env: | |
| GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}" # Refer secrets of github above | |
| GPG_PASSPHRASE: "${{ secrets.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 #this is used to generate new version of helm chart along with some file with extension .prov | |
| uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 #v1.6.0 | |
| with: | |
| skip_existing: true | |
| env: | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| CR_KEY: "${{ secrets.CR_KEY }}" # Key name used while creating key | |
| CR_SIGN: true # Set to true to sign images |