Skip to content

Commit 93e4ec9

Browse files
author
Cliff Odijk
committed
Allow running multiple directories
1 parent f9d1598 commit 93e4ec9

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

action.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Comments } from './comment';
1414
import { Inputs } from './inputs';
1515
import { AssemblyProcessor } from './stage-processor';
1616

17-
export async function run() {
17+
export async function run(cdkOutDir: string) {
1818
const inputs: Inputs = {
1919
title: getInput('title') || undefined,
2020
defaultStageDisplayName: getInput('defaultStageDisplayName', {
@@ -28,7 +28,7 @@ export async function run() {
2828
required: true,
2929
}),
3030
noFailOnDestructiveChanges: getMultilineInput('noFailOnDestructiveChanges'),
31-
cdkOutDir: getInput('cdkOutDir', { required: true }),
31+
cdkOutDir: cdkOutDir,
3232
diffMethod: getInput('diffMethod', { required: true }),
3333
};
3434

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as core from '@actions/core';
22
import { run } from './action';
33

4-
run().catch((error: any) => {
4+
const dirs: string = core.getInput('cdkOutDirs', { required: true });
5+
6+
Promise.all(dirs.split(',').map((dir) => run(dir))).catch((error: any) => {
57
core.setFailed(error.message);
68
});

0 commit comments

Comments
 (0)