Skip to content

Release Charts

Release Charts #95

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
with:
ref: gh-pages
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- 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 index...'
cr index --owner snyk --git-repo runtime-sensor --push --packages-with-index --index-path .
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"