build(deps): bump helm/kind-action from 1.11.0 to 1.12.0 #60
Workflow file for this run
This file contains 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: Test and Release sopSeed Helm Chart | |
on: | |
push: | |
paths: | |
- "./chart/**" | |
pull_request: | |
paths: | |
- "./chart/**" | |
- ".github/workflows/helm-release.yml" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
HELM_VERSION: v3.13.3 | |
jobs: | |
lint-test: | |
name: Lint and Test sopSeed Helm Chart | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12.0" | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
with: | |
version: v3.9.0 | |
yamllint_version: 1.32.0 | |
yamale_version: 4.0.4 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
# Determine the target branch | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
TARGET_BRANCH="${{ github.base_ref }}" | |
# Fetch the target branch | |
git fetch origin ${TARGET_BRANCH}:${TARGET_BRANCH} | |
else | |
TARGET_BRANCH="main" | |
fi | |
echo "Running chart-testing against target branch: ${TARGET_BRANCH}" | |
changed=$(ct list-changed --target-branch ${TARGET_BRANCH}) | |
if [[ ! -n "${changed}" ]]; then | |
echo "CHANGED=true" >> $GITHUB_ENV | |
fi | |
- name: Run chart-testing (lint) | |
if: ${{ env.CHANGED == 'true' }} | |
run: | | |
ct lint --config chart/ct.yaml | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
if: ${{ env.CHANGED == 'true' }} | |
- name: Run chart-testing (install) | |
if: ${{ env.CHANGED == 'true' }} | |
run: | | |
ct install --config chart/ct.yaml | |
release: | |
name: Release sopSeed Helm Chart | |
needs: lint-test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
if: ${{ github.event_name != 'pull_request' }} | |
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@v4 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Package Helm Chart | |
env: | |
CHART_DIR: "./chart" | |
run: | | |
cd ${CHART_DIR} | |
helm dependency build | |
# Get the chart version | |
CHART_VERSION=$(helm show chart . | grep '^version:' | cut -d' ' -f2) | |
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_ENV | |
cd - | |
helm package ${CHART_DIR} -d .helm-charts | |
- name: Push Helm Chart to OCI Registry | |
env: | |
HELM_EXPERIMENTAL_OCI: 1 | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin | |
helm push .helm-charts/sopseed-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}/sopseed-chart | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Release v${{ env.CHART_VERSION }} | |
tag_name: v${{ env.CHART_VERSION }} | |
draft: false | |
prerelease: false | |
files: .helm-charts/sopseed-${{ env.CHART_VERSION }}.tgz | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |