DSACMS / repo-scaffolder

Templates and commandline tools for creating repositories for US Federal open source projects
Creative Commons Zero v1.0 Universal
21 stars 8 forks source link

fix Jinja template conflict with Github Action #99

Closed Firebird1029 closed 2 months ago

Firebird1029 commented 2 months ago

Fix Jinja template conflict with Github Action

Problem

When using cookiecutter on Tiers 2, 3, or 4, cookiecutter tries to replace the needs variable within the scope ${{ }} in the Github Action script, but the ${{ }} will actually be interpolated at the Github Action level, not the Jinja level, so that scope needs to be escaped by adding {% raw %}.

Solution

I added {% raw %} to the three Github Action scripts to escape the ${{ }}.

Result

Running cookiecutter on tiers 2-4 now exit cleanly without an error.