Skip to content

Merge pull request #9 from tjungbauer/renovate/pin-dependencies #212

Merge pull request #9 from tjungbauer/renovate/pin-dependencies

Merge pull request #9 from tjungbauer/renovate/pin-dependencies #212

Workflow file for this run

name: Linting
on:
push:
branches:
- main
pull_request:
paths-ignore:
- '.github/**'
- 'README.md'
jobs:
ct-lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@b43128a8b25298e1e7b043b78ea6613844e079b1 # v2.6.0
- name: Run chart-testing (lint)
run: |
#!/usr/bin/env bash
for charts in `find . -name 'Chart.yaml' -type f | xargs -I{} dirname {}`; do
printf "\n\n##### CHECKING $charts #####\n";
ct lint --charts $charts;
done
lint-test:
runs-on: ubuntu-latest
container:
image: quay.io/tjungbau/linter-image:v1.0.0@sha256:7261df441959b0e2053a6c2a33e76b1ff7c508f2e2c4bc018fa6b202ac9f7374
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Run helm lint on found Charts
run: |
#!/usr/bin/env bash
for charts in $(find . -name 'Chart.yaml'); do
helm_dir=$(dirname "${charts}")
echo "Checking $helm_dir"
echo "Trying to find in-cluster-values.yaml files"
add_val_files=$(find $helm_dir -type f -name in-cluster-values.yaml)
if [ -z "$add_val_files" ]; then
echo "No additional files found"
values=""
else
echo "Additional file found $add_val_files"
values="-f $add_val_files"
fi
helm dep up "${helm_dir}"
helm lint --strict $values "${helm_dir}"
echo "Done"
done
- name: Run yamllint on all values-files
id: yamllint_test
run: |
get_files=$(find . -type f -name '*values.yaml')
yamllint -f standard -c .yamllint.yaml $get_files
echo "Done checking with yamllint"