lamby icon indicating copy to clipboard operation
lamby copied to clipboard

GitHub Actions Caching

Open metaskills opened this issue 4 years ago • 5 comments

So @vlaaaaaaad made this tweet how GitHub Actions now has great support for caching (https://twitter.com/iamvlaaaaaaad/status/1421529670353408001)

For us this is not likely a two line change since we use Docker in Docker. However, I wonder if we can share the right directories and take advantage of this?

metaskills avatar Aug 01 '21 15:08 metaskills

Not sure this will for us without having to not use sam build and move a lot of things around to accommodate that since this action (https://github.com/docker/build-push-action) runs docker from the action and expects to build and push.

metaskills avatar Aug 01 '21 23:08 metaskills

Would love this. The majority of the build time is getting the ruby image.

That said, it seems the new school way AWS wants us to do this with sam build is using AWS SAM Accelerate

synth avatar Aug 10 '22 05:08 synth

Right, but I thought that was for Zip vs. Image format. Do you know? I have not looked.

metaskills avatar Aug 13 '22 15:08 metaskills

I'm not too sure. The documentation is sparse. The tutorial uses zip not image. I wonder if we can simply add the --cached to sam build if that would work. I can try later next week.

References I found:

  • https://aws.amazon.com/blogs/compute/accelerating-serverless-development-with-aws-sam-accelerate/
  • https://stackoverflow.com/questions/71638085/is-there-a-way-to-incrementally-build-container-images-with-aws-sam
  • https://github.com/aws/aws-sam-cli/issues/805
  • https://github.com/aws/aws-sam-cli/issues/3677

synth avatar Aug 13 '22 19:08 synth

Done here, both for packages and devcontainer:

  • https://github.com/customink/lamby-cookiecutter/pull/21
  • https://github.com/customink/lamby-cookiecutter/commit/4945ed2ef3ccc276763aa43c32714bc4bb9251bc

metaskills avatar Dec 05 '22 12:12 metaskills

Ah-may-zing! Thank you!

synth avatar Dec 06 '22 17:12 synth