Skip to content

Variables in Markdown

Actions
Allows variable templating in Markdown
v1.0.0
Latest
Star (46)

Variables in Markdown

This GitHub Action will allow you to set variables in Markdown and interpolate throughout your GitHub Issue.

Usage

This GitHub Action that replaces template in your variables

on: issues
name: Template Variables in Markdown
jobs:
  markdown:
    name: markdown-marker
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: bdougie/variables-in-markdown@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Testing

This action is best used with issue templates. Create an example .github/ISSUE_TEMPLATE.md file. This file should have front matter to help construct the new issue:

---
title: New Issue
labels: bug, enhancement
---
<!--#
NOUN=mother
ATTRIBUTION=Mark Wahlberg
$-->

"Say hi to your {{ NOUN }} for me," {{ ATTRIBUTION }}

You'll notice that the above example has some {{ MUSTACHE }} variables. This is needed for the API to find and replace variables. This is powered by the marky_markdown ruby gem.

Variables in Markdown is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Allows variable templating in Markdown
v1.0.0
Latest

Variables in Markdown is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.