Render
github_custom_actions.ActionBase.render(template, **kwargs)
Render the template from the string with Jinja.
kwargs are the template context variables.
Also includes to the context the action's inputs, outputs, and env.
So you can use something like:
self.render("### {{ inputs.name }}!\nHave a nice day!")
Source code in src/github_custom_actions/action_base.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
github_custom_actions.ActionBase.render_template(template_name, **kwargs)
Render template from the templates directory.
template_name is the name of the template file without the extension.
kwargs are the template context variables.
Also includes to the context the action's inputs, outputs, and env.
Usage:
self.render_template("executor.json", image="ubuntu-latest")
Source code in src/github_custom_actions/action_base.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |