diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml new file mode 100644 index 0000000..167eab9 --- /dev/null +++ b/.github/workflows/pr-test.yml @@ -0,0 +1,33 @@ +name: Test pr + +on: + pull_request: + +jobs: + lint: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v3 + - uses: azure/setup-helm@v1 + + - name: Lint Helm charts + run: | + CHARTS_DIR="./template" + + for VERSION_DIR in $(find "$CHARTS_DIR" -maxdepth 1 -type d); do + if [ -f "$VERSION_DIR/ce/Chart.yaml" ] || [ -f "$VERSION_DIR/cluster/Chart.yaml" ] || [ -f "$VERSION_DIR/pro/Chart.yaml" ]; then + echo "Linting charts in version directory: $VERSION_DIR" + + if [ -f "$VERSION_DIR/ce/Chart.yaml" ]; then + helm lint "$VERSION_DIR/ce" + fi + + if [ -f "$VERSION_DIR/cluster/Chart.yaml" ]; then + helm lint "$VERSION_DIR/cluster" + fi + + if [ -f "$VERSION_DIR/pro/Chart.yaml" ]; then + helm lint "$VERSION_DIR/pro" + fi + fi + done \ No newline at end of file