sam-cli-action icon indicating copy to clipboard operation
sam-cli-action copied to clipboard

aws-sam-cli being installed multiple times

Open aprilmintacpineda opened this issue 4 years ago • 6 comments

Is your feature request related to a problem? Please describe.

entrypoint.sh contains installAwsSam which installs aws-sam-cli every time.

Describe the solution you'd like

  1. If possible, use a different docker image like https://registry.hub.docker.com/r/vukomir/aws-sam-cli that comes with nodejs and aws-sam-cli.
  2. Add a check on entrypoint.sh to check for sam --version and install sam cli based on that output.

Describe alternatives you've considered

None.

Additional context

N/A

aprilmintacpineda avatar Sep 07 '20 11:09 aprilmintacpineda

@aprilmintacpineda if you can please put up a PR. Using the docker image you linked will save a lot of time when the action runs.

cody-hoffman avatar Sep 07 '20 14:09 cody-hoffman

Sure thing!

aprilmintacpineda avatar Sep 07 '20 14:09 aprilmintacpineda

While I'm not against this approach (anything that speeds up builds its great!!), the version of SAM in this docker image is very old. Just something to be aware of @aprilmintacpineda @cody-hoffman

TomBeckett avatar Oct 08 '20 12:10 TomBeckett

Actually I tried out not using this, turns out sam-cli and it's dependencies are installed by default on github actions, I was able to build and deploy without this tool

aprilmintacpineda avatar Oct 08 '20 22:10 aprilmintacpineda

@aprilmintacpineda can you share an example of how that works?

cody-hoffman avatar Oct 13 '20 19:10 cody-hoffman

Under the Virtual Environments Docs there is a list of preinstalled software. AWS SAM is listed. https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#cli-tools

cdierkens avatar Oct 24 '20 05:10 cdierkens