diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..9865998e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,60 @@ +name: Lint Helm Charts +on: + pull_request: + +jobs: + lint-charts: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: 'latest' + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts) + if [[ -n "$changed" ]]; then + echo "changed=true" >> $GITHUB_OUTPUT + fi + + - name: Create kind cluster + if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.12.0 + + - name: Add Helm repositories + if: steps.list-changed.outputs.changed == 'true' + run: | + find charts -name "requirements.yaml" -exec grep 'repository: https://' {} + | awk '{print $2}' | sort -u | while read -r repo; do + repo_name=$(echo "$repo" | sed -e 's,https://,,; s,http://,,; s,/.*,,; s,\..*,,') + helm repo add "$repo_name" "$repo" + done + + - name: Build Helm dependencies + if: steps.list-changed.outputs.changed == 'true' + run: | + for chart in $(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts); do + helm dependency build "$chart" + done + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: | + ct lint-and-install \ + --check-version-increment=true \ + --target-branch ${{ github.event.repository.default_branch }} \ + --chart-dirs charts diff --git a/charts/buildbuddy/Chart.yaml b/charts/buildbuddy/Chart.yaml index 1d18ccf9..13ef8480 100644 --- a/charts/buildbuddy/Chart.yaml +++ b/charts/buildbuddy/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: BuildBuddy Open Source name: buildbuddy -version: 0.0.328 # Chart version +version: 0.0.329 # Chart version appVersion: 2.180.0 # Version of deployed app keywords: - buildbuddy diff --git a/charts/buildbuddy/values.yaml b/charts/buildbuddy/values.yaml index 15afa7c1..80daf4bd 100644 --- a/charts/buildbuddy/values.yaml +++ b/charts/buildbuddy/values.yaml @@ -1,3 +1,4 @@ +# This is a test comment to trigger CI. ## Default values for BuildBuddy. ## This is a YAML-formatted file. ## Declare variables to be passed into your templates.