Skip to content

Github Action that can generate markdown tables from json or yaml files

License

Notifications You must be signed in to change notification settings

gazab/create-markdown-table

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

create-markdown-table status

Create Markdown Table Action

Usage

Basic example:

steps:
  - uses: gazab/create-markdown-table@v1
    id: create_table
    with:
      file: ./table-data.json
  - run: echo ${{ steps.create_table.outputs.table }}

With specific columns specified

steps:
  - uses: gazab/create-markdown-table@v1
    id: create_table
    with:
      file: ./table-data.json
      columns: '[ "Id", "Name" ]'
  - run: echo ${{ steps.create_table.outputs.table }}

Inputs

file

(Required) Path to the JSON/YAML file to convert to a Markdown table

columns

JSON formatted list of columns and their order you want the table to include. Default: All properties of the first object in the input file.

capitalize

Capitalize the first letter of each column name in the header. Default: true.

Outputs

table

The created Markdown table