File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
actions/helm/generate-docs Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 7777 core.setOutput("values-file", valuesFile);
7878 }
7979
80+ // Generate markdownlint config file if not exists
81+ const fs = require('node:fs');
82+ const path = require('node:path');
83+ let markdownlintConfigPath = path.join(workingDirectory, ".markdownlint.json");
84+ if (!fs.existsSync(markdownlintConfigPath)) {
85+ markdownlintConfigPath = path.join(process.env.RUNNER_TEMP, `markdownlint-config-${Date.now()}.json`);
86+ const defaultConfig = {
87+ "default": true,
88+ "line-length": { "max": 300 }
89+ };
90+ fs.writeFileSync(markdownlintConfigPath, JSON.stringify(defaultConfig, null, 2));
91+ }
92+ core.setOutput("markdownlint-config-path", markdownlintConfigPath);
93+
8094 - uses : hoverkraft-tech/ci-github-common/actions/checkout@5f11437c716059f30c635f90055060e4ef8b31a0 # 0.28.0
8195
8296 - uses : losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
93107 uses : DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0
94108 with :
95109 fix : true
110+ config : ${{ steps.prepare-variables.outputs.markdownlint-config-path }}
96111 globs : ${{ steps.prepare-variables.outputs.working-directory }}/**/*.md
97112
98113 - shell : bash
You can’t perform that action at this time.
0 commit comments