Skip to content

Helm

Helm #28

Workflow file for this run

name: Helm
on:
workflow_dispatch: {}
push:
tags: [ 'v*.*.*' ]
env:
REGISTRY: ghcr.io
CHART_DIR: helm/kink
HELM_REPO: "oci://ghcr.io/${{ github.repository }}/charts"
jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get Tag
id: tagName
uses: olegtarasov/[email protected]
- name: Install Helm
run:
make helm
- name: Lint
run: |
bin/helm lint "${CHART_DIR}"
bin/helm template "${CHART_DIR}"
# Release charts
- name: Push Charts
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
set -x
bin/helm registry login "${REGISTRY}" -u "${GITHUB_ACTOR}" -p "${GITHUB_TOKEN}"
GIT_TAG="${{ steps.tagName.outputs.tag }}"
if [ -n "${GIT_TAG}" ]; then
NEW_VERSION="${GIT_TAG}"
NEW_APP_VERSION="${GIT_TAG}"
else
NEW_VERSION=""
NEW_APP_VERSION="sha-${GITHUB_SHA}"
fi
make chart CHART_VERSION="${NEW_VERSION}" CHART_APP_VERSION="${NEW_APP_VERSION}" CHART_GIT_SHA="${GITHUB_SHA}"
bin/helm push bin/charts/kink-*.tgz "${HELM_REPO}"