Add .github/workflows/templates/README.md

This readme explains what the directory contains, and how it should be used.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-02-01 18:14:23 +00:00 committed by Pedro Algarvio
parent 972c71c7fa
commit 76e449951b

20
.github/workflows/templates/README.md vendored Normal file
View file

@ -0,0 +1,20 @@
# Workflow Templates
The templates are used to generate the actual workflows that run on GitHub Actions.
They use [Jinja2](https://jinja.palletsprojects.com) as the template engine.
## To Note
Let's try to keep the Jinja usage to the bare minimum because, as time passes,
the complexity just piles up making it harder to read and interpret the templates.
### Changes To Default Jinja Syntax
By default Jinja uses `{% ... %}`, `{{ ... }}`, `{# ... #}`, etc to do it's magic.
In order not to clash with the GitHub Actions syntax, and to also avoid having to
add bunch of `{% raw %} ... {% endraw %}` blocks, we changed some things:
* Instead of `{%` and `%}` use `<%` and `%>`
* Instead of `{{` and `}}` use `<{` and `}>`
The rest of Jinja2 defaults apply.