-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for compiling Jinja-style templates in sync process #271
Conversation
Hey @dhruvkb, thanks for taking the time to create this PR! I wanted to add support for templates for a while (#204) but never had the time to work on it so far. Any specific reasons for going with Nunjucks as the template engine instead of others like mustache, Handlebars or one of the many others? |
To be honest, it was largely a subjective choice. I come from a Python background where Jinja is like the gold standard so Nunjucks made sense. If you have a strong preference for an alternative template engine, I think it'll be a small change and I'll be happy to update the PR. The other alternative I considered was Pug but that seemed very specifically aimed for HTML templates. |
@BetaHuhn is something needed from my end to get this PR merged? We'd like to use templates in our repos so we're eagerly looking forward to a release that includes this feature. |
Makes sense. No strong opinions on my side, was just curious :)
@dhruvkb No, was just too busy to actually review the changes. Will take a look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the README to make it easier for people not familiar with Jinja or Nunjucks. Otherwise everything looks good.
Thanks again for the PR @dhruvkb!
🎉 This PR is included in version 1.18.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…nc process (BetaHuhn#271) * Add `nunjucks` and update `@actions/core` * Read template info from YAML config file * Render templates when copying files * Compile JS files into action * Add documentation about the templating feature * update readme Co-authored-by: Maximilian Schiller <[email protected]>
…nc process (BetaHuhn#271) * Add `nunjucks` and update `@actions/core` * Read template info from YAML config file * Render templates when copying files * Compile JS files into action * Add documentation about the templating feature * update readme Co-authored-by: Maximilian Schiller <[email protected]>
Sometimes a single file must be synced to different repositories with small differences. This PR allows files to be marked as templates which are then rendered using Nunjucks instead of simply being copied over as-is.