Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Skip CDK and TypeScript installations if they are already installed #56

Open
Dzhuneyt opened this issue Aug 10, 2022 · 1 comment
Open

Comments

@Dzhuneyt
Copy link

Dzhuneyt commented Aug 10, 2022

While looking at ways to optimize the GitHub actions usage (build minutes, billing) for our projects, I noticed that using the CDK GitHub action was always taking a significant amount of time, compared to running our own "cdk synth" or "cdk deploy" commands without this action.

Looking deeper, I noticed that this action is ALWAYS installing typescript and the CDK CLI, regardless if they are already installed inside the project through other means (e.g. a global install step that precedes all other steps, including CDK deployment; which is what we have today - a single dependency installation step that prepares the ground for all subsequent build, test, deploy stages).

So my suggestion is to replace the existing commands for installing the TypeScript and CDK tooling with alternatives that only install them conditionally, e.g:

typescript version || npm install typescript

cdk --version || npm install aws-cdk

I might be able to contribute with such improvements, but wanted to see what the maintainer and consumers of this action think about the idea.

@shawnstrickland
Copy link

I like this idea, especially with multiple stacks to deploy. Would love to reference a matrix list of stacks and just have the deploy command loop over them with a single idk instantiation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants