A super simple GitHub Action to render a handlebars template.
Features
- Renders any handlebars template
- Accepts any inputs via JSON string
- Outputs an escaped string that can be used as an input to a different Action
name: 'Render Template'
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master
jobs:
deploy:
name: 'Render'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: badsyntax/github-action-render-template@v0.0.1
name: Render Template
id: render-template
with:
template: '.github/pr-comment-template.hbs'
inputs: |
{
"firstName":"Bob",
"lastName":"Marley"
}
- name: Output Rendered Template
run: |
echo "Rendered Template: $OUTPUT"
env:
OUTPUT: ${{ steps.render-template.outputs.result }}
Name | Description | Example |
---|---|---|
template |
The path to the handlebars template file | ./.github/pr-comment-template.hbs |
inputs |
A JSON string object of key value pairs (can include newlines) | {"key":"value"} |
Name | Description | Example |
---|---|---|
result |
Escaped rendered template which can be used an input to a different Action | (your rendered template) |
- ๐ Submit a bug report
- ๐ Submit a feature request
See LICENSE.md.