Action that uses handlebars to render arbitrary template payloads.
Any variables passed will be used as context for the template.
uses: garnertb/template-action@v1
with:
  template: Whats up {{ name }}?
  name: Mona
# Returns
# >> Whats up Mona?This example creates a summary issue with all issues updated in the last week.
# Query recently updated issues
- uses: octokit/[email protected]
  id: open-issues
  with:
    route: /repos/:owner/:repo/issues?sort=updated&per_page=100&state=all
    owner: garnertb
    repo: template-action
  env:
    GITHUB_TOKEN: ${{ secrets.token }} 
# Use template-action to generate the issue body
- uses: garnertb/template-action@v1
  id: issue-body
  with:
    issues: ${{ steps.open-issues.outputs.data }}
    template: |
      ## Open issues
      {{ #each issues }}
      {{ #withinAWeek this.updated_at }}
      - [ ] #{{ this.number }}
      {{ /withinAWeek }}
      {{ /each }}
# Create summary issue from template payload
- uses: imjohnbo/issue-bot@v3
  with:
    body: ${{ steps.issue-body.outputs.payload }}
    title: Issues from this weekGenerated issue: