Skip to content

v0.4.12

v0.4.12 #166

Workflow file for this run

name: Helm
on:
pull_request:
paths:
- 'deploy/chart/**'
workflow_dispatch: {}
release: {}
permissions:
contents: read
jobs:
helm-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Version
run: |
TAG=$(git describe --tags --abbrev=0)
sed -ie "s/appVersion: \"latest\"/appVersion: ${TAG#helm-}/g" deploy/chart/Chart.yaml
sed -ie "s/version: 0.0.0/version: ${TAG#helm-}/g" deploy/chart/Chart.yaml
- name: Set up Helm
uses: azure/setup-helm@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
- name: Run chart-testing (lint)
run: ct lint --check-version-increment=false --chart-dirs deploy --target-branch ${{ github.event.repository.default_branch }}
# we cannot test a helm install without a valid linode
# - name: Create kind cluster
# uses: helm/kind-action@v1.8.0
#- name: Run chart-testing (install)
# run: ct install --chart-dirs helm-chart --namespace kube-system --helm-extra-set-args "--set=apiToken=test --set=region=us-east" --target-branch ${{ github.event.repository.default_branch }}
helm-release:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: helm-test
permissions:
contents: write # for helm/chart-releaser-action to push chart release and create a release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Version
run: |
TAG=$(git describe --tags --abbrev=0)
sed -ie "s/appVersion: \"latest\"/appVersion: ${TAG#helm-}/g" deploy/chart/Chart.yaml
sed -ie "s/version: 0.0.0/version: ${TAG#helm-}/g" deploy/chart/Chart.yaml
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Helm
uses: azure/setup-helm@v3
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "helm-{{ .Version }}"
with:
charts_dir: deploy
skip_existing: true