diff --git a/.github/workflows/charts-release-action.yml b/.github/workflows/charts-release-action.yml index 60d9acda..5b4b5f86 100644 --- a/.github/workflows/charts-release-action.yml +++ b/.github/workflows/charts-release-action.yml @@ -21,13 +21,13 @@ jobs: - name: Configure Git run: | git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - # Run the helm chart release command + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + # Run the helm chart release command - name: Run csm chart-releaser uses: helm/chart-releaser-action@v1.6.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - with: + with: charts_dir: charts skip_existing: true diff --git a/.github/workflows/helm-validations.yml b/.github/workflows/helm-validations.yml index 6577dccc..47101eef 100644 --- a/.github/workflows/helm-validations.yml +++ b/.github/workflows/helm-validations.yml @@ -15,16 +15,16 @@ jobs: check_files: runs-on: ubuntu-latest outputs: - run_tests: ${{ steps.diff.outputs.run_tests }} + run_tests: ${{ steps.diff.outputs.run_tests }} steps: - - uses: actions/checkout@v4 - - name: Check for files changed - id: diff - run: | - URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" - FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename') - echo $FILES | grep \.yaml && echo '::set-output name=run_tests::true' || true - + - uses: actions/checkout@v4 + - name: Check for files changed + id: diff + run: | + URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" + FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename') + echo $FILES | grep \.yaml && echo '::set-output name=run_tests::true' || true + # This job will run helm lint and version increment check on updated charts lint: runs-on: ubuntu-latest @@ -35,10 +35,10 @@ jobs: # Check out the repo - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: "0" - - # Lint and version increment checks on updated charts + with: + fetch-depth: "0" + + # Lint and version increment checks on updated charts - name: Run lint/version increment checks id: versionIncrement # Bump to proper version after this issue is fixed : https://github.com/helm/chart-testing-action/issues/132 @@ -46,8 +46,8 @@ jobs: with: command: lint config: lintConfig.yaml - - # This job checks that dependency versions have been updated on the karavi-observability chart + + # This job checks that dependency versions have been updated on the karavi-observability chart dependency: runs-on: ubuntu-latest # Only run job when .yaml file is changed @@ -57,9 +57,9 @@ jobs: # Check out the repo - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: "0" - + with: + fetch-depth: "0" + # Run a check on karavi-observability chart for updated dependency versions - name: Run dependency version checks id: lint diff --git a/.github/workflows/kubelinter.yaml b/.github/workflows/kubelinter.yaml index 25e7ad34..22d9322f 100644 --- a/.github/workflows/kubelinter.yaml +++ b/.github/workflows/kubelinter.yaml @@ -26,4 +26,3 @@ jobs: with: directory: charts/cosi config: kubelinter-config.yaml - diff --git a/.github/workflows/wizard-release-action.yml b/.github/workflows/wizard-release-action.yml index ea36ec11..1e62d837 100644 --- a/.github/workflows/wizard-release-action.yml +++ b/.github/workflows/wizard-release-action.yml @@ -25,12 +25,12 @@ jobs: run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - + # Run the helm chart release command - name: Run csm chart-releaser for container-storage-modules uses: helm/chart-releaser-action@v1.6.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - with: + with: charts_dir: installation-wizard skip_existing: true diff --git a/.github/workflows/yamllinter.yaml b/.github/workflows/yamllinter.yaml new file mode 100644 index 00000000..c241adda --- /dev/null +++ b/.github/workflows/yamllinter.yaml @@ -0,0 +1,22 @@ +# This action checks the linting errors in yaml files +name: yaml-lint + +on: + pull_request: + branches: + - main + - release-v* + +jobs: + yaml_lint_scan: + name: Run Yaml Lint + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: pip install yamllint + - run: yamllint . diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..9e626efa --- /dev/null +++ b/.yamllint @@ -0,0 +1,34 @@ +--- +yaml-files: + - "*.yaml" + - "*.yml" + - ".yamllint" + +rules: + braces: enable + brackets: enable + colons: enable + commas: enable + comments: + level: warning + comments-indentation: + level: warning + document-end: disable + document-start: disable + empty-lines: enable + empty-values: disable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: disable + new-line-at-end-of-file: enable + new-lines: enable + octal-values: disable + quoted-strings: disable + trailing-spaces: enable + truthy: + level: warning + +ignore: + - .github/workflows/