diff options
author | Josh Spicer <joshspicer@github.com> | 2022-06-14 03:01:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 03:01:19 +0300 |
commit | 2fa323248528604a3548fd1292c74c7b473c611b (patch) | |
tree | 39831944b1ed879a3342310b6f2a107e48153aad /.github/devcontainers-action/lib/main.js | |
parent | fac5e5a4540ffc79138b94ce8edfd329a209b250 (diff) |
Devcontainer docs (#47)
* docs
* automatically generate documentation from features.json
* trigger doc gen
* 1
* no-ci
* no-ci
* no-ci
* no-ci
* comment out pull
* Automated documentation update
* no-ci markdown table
* Automated documentation update
* no-ci
* Automated documentation update
* branch to main
Co-authored-by: Devcontainers CI <vscr-feedback@microsoft.com>
Diffstat (limited to '.github/devcontainers-action/lib/main.js')
-rw-r--r-- | .github/devcontainers-action/lib/main.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.github/devcontainers-action/lib/main.js b/.github/devcontainers-action/lib/main.js index 63d938e..2e5d391 100644 --- a/.github/devcontainers-action/lib/main.js +++ b/.github/devcontainers-action/lib/main.js @@ -33,12 +33,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); +const generateDocs_1 = require("./generateDocs"); const utils_1 = require("./utils"); function run() { return __awaiter(this, void 0, void 0, function* () { core.debug('Reading input parameters...'); + // Read inputs const shouldPublishFeatures = core.getInput('publish-features').toLowerCase() === 'true'; const shouldPublishTemplate = core.getInput('publish-templates').toLowerCase() === 'true'; + const shouldGenerateDocumentation = core.getInput('generate-docs').toLowerCase() === 'true'; if (shouldPublishFeatures) { core.info('Publishing features...'); const featuresBasePath = core.getInput('base-path-to-features'); @@ -49,6 +52,17 @@ function run() { const basePathToDefinitions = core.getInput('base-path-to-templates'); yield packageTemplates(basePathToDefinitions); } + if (shouldGenerateDocumentation) { + core.info('Generating documentation...'); + const featuresBasePath = core.getInput('base-path-to-features'); + if (featuresBasePath) { + yield (0, generateDocs_1.generateFeaturesDocumentation)(featuresBasePath); + } + else { + core.error("'base-path-to-features' input is required to generate documentation"); + } + // TODO: base-path-to-templates + } // TODO: Programatically add feature/template fino with relevant metadata for UX clients. core.info('Generation metadata file: devcontainer-collection.json'); yield (0, utils_1.addCollectionsMetadataFile)(); |