TractorZoom / sam-cli-action

Github Action to build, package, and deploy serverless applications using the AWS SAM CLI.
18 stars 9 forks source link

aws-sam-cli being installed multiple times #14

Open aprilmintacpineda opened 3 years ago

aprilmintacpineda commented 3 years ago

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

cody-hoffman commented 3 years ago

@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.

aprilmintacpineda commented 3 years ago

Sure thing!

TomBeckett commented 3 years ago

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

aprilmintacpineda commented 3 years ago

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

cody-hoffman commented 3 years ago

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

cdierkens commented 3 years ago

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