Skip to content

Commit

Permalink
Make with: type more permissive (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmaanT authored Jan 11, 2021
1 parent eb871b5 commit 7722609
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cdkactions/src/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface StepsProps extends RunProps {
/**
* A map of parameters for an external action.
*/
readonly with?: StringMap;
readonly with?: { [key: string]: string | number | boolean };

/**
* Additional environment variables.
Expand Down
9 changes: 9 additions & 0 deletions packages/cdkactions/test/__snapshots__/job.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ Object {
"timeout-minutes": 5,
"working-directory": "~/",
},
Object {
"name": "External action",
"uses": "actions/checkout@v2",
"with": Object {
"booleanValue": false,
"numberValue": 10,
"stringValue": "string",
},
},
],
"strategy": Object {
"fail-fast": true,
Expand Down
9 changes: 9 additions & 0 deletions packages/cdkactions/test/job.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ test('toGHAction', () => {
continueOnError: false,
timeoutMinutes: 5,
workingDirectory: '~/',
},
{
name: 'External action',
uses: 'actions/checkout@v2',
with: {
stringValue: 'string',
numberValue: 10,
booleanValue: false,
},
}],
});
expect(job.toGHAction()).toMatchSnapshot();
Expand Down

0 comments on commit 7722609

Please sign in to comment.