rails-lambda / lamby-cookiecutter

🐑🛤 AWS SAM Cookiecutter to Quick Start Rails & Lambda
https://lamby.cloud/docs/quick_start
37 stars 18 forks source link

Fix interpolation issue in ci.yml #47

Closed tumes closed 1 month ago

tumes commented 2 months ago

Attempting to run the cookie cutter runs a command that should actually be output as a string in the generated template.

darkhelmet commented 2 months ago

Is this the Error message: 'github' is undefined error?

I'm trying move my existing app to Lambda via Lamby and it's such a terrible process. It assumes you're starting from scratch and wants to run the cookie cutter, which doesn't run (error message above) for me, so I can't even get the bunch of files to look at. There doesn't seem to be a bundle exec lamby init action to run as there may have been in the past.

Ulthran commented 1 month ago

+1 to this. I'm just trying to follow the quickstart guide and it fails on the first command:

$ docker run   --rm   --interactive   --volume "${PWD}:/var/task"   ghcr.io/rails-lambda/lamby-cookiecutter   "gh:rails-lambda/lamby-cookiecutter"

project_name [my_awesome_lambda]:
Unable to create file '.github/workflows/ci.yml'
Error message: 'github' is undefined
Context: {
    "cookiecutter": {
        "_output_dir": "/var/task",
        "_template": "gh:rails-lambda/lamby-cookiecutter",
        "project_name": "my_awesome_lambda"
    }
}

This seems to be a fairly established problematic paradigm with cookiecutter (https://github.com/cookiecutter/cookiecutter/issues/1624). With my limited experience with both cookiecutter and rails, I'm confused how this exists and how it's not something everyone runs into. What am I missing here?

jeremiahlukus commented 1 month ago

@Ulthran Sorry for the tardiness, thank you for the fix!

fabiensebban commented 2 weeks ago

@jeremiahlukus , it seems the error is still here: https://github.com/rails-lambda/lamby-cookiecutter/blob/1e6c4aa70796c9eca852500df7c155cc8b91cc2a/%7B%7Bcookiecutter.project_name%7D%7D/.github/workflows/ci.yml#L99

It solved in this PR: #50

jeremiahlukus commented 2 weeks ago

there is some auto update that keeps adding it back

https://github.com/rails-lambda/lamby-cookiecutter/commit/4f4d54ccb103c26b5ceb350256b6d251d90415b7

Ill look into that

jeremiahlukus commented 2 weeks ago

Here is a version of your PR that the auto update removed

https://github.com/rails-lambda/lamby-cookiecutter/commit/3526dcc172e335cd7e6c6263865ad8f549529fcf

jeremiahlukus commented 2 weeks ago

@fabiensebban releasing now