Skip to content

Release Charts

Release Charts #92

Workflow file for this run

name: Release Charts
on:
workflow_dispatch:
release:
types: [published]
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Chart Releaser and run upload
run: |
if [[ ! -d "$RUNNER_TOOL_CACHE" ]]; then
echo "Cache directory '$RUNNER_TOOL_CACHE' does not exist" >&2
exit 1
fi
arch=$(uname -m)
cr_version="v1.6.1"
install_dir="$RUNNER_TOOL_CACHE/cr/$cr_version/$arch"
mkdir -p "$install_dir"
echo "Installing chart-releaser on $install_dir..."
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/$cr_version/chart-releaser_${cr_version#v}_linux_amd64.tar.gz"
tar -xzf cr.tar.gz -C "$install_dir"
rm -f cr.tar.gz
echo 'Adding cr directory to PATH...'
export PATH="$install_dir:$PATH"
echo 'Updating charts indesx...'
cr index
env:
CR_SKIP_EXISTING: true
CR_OWNER: snyk
CR_GIT_REPO: runtime-sensor
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"