Skip to content

Update Action README

Actions
Renders Markdown tables for inputs and outputs from action.yaml file
v1.2.0
Latest
Star (2)

Test ShellCheck

Update README Inputs/Outputs Action

Renders Markdown tables for inputs and outputs from actions.yml file.

Usage

Add following lines to Markdown file:

<!--(inputs-start)-->
<!--(inputs-end)-->

<!--(outputs-start)-->
<!--(outputs-end)-->

This action will always replace contents between start/end tags. Only one pair might be used.

The script update_readme.sh is also usable on its own:

update_readme.sh [target file = README.md] [action definition = action.yml]

Example Workflow

name: Update README.md
on:
  push:
    branches: [ "**" ]
    paths:
      - action.yml
  workflow_dispatch:

jobs:
  generate:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Update README.md
        uses: mdvorak/update-action-readme@v1

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v4
        with:
          title: "docs(readme): update README.md tables on ${{ github.ref_name }}"
          commit-message: "docs(readme): updated README.md inputs table"
          body: "Updated README.md inputs/outputs tables, according to action.yml file"
          branch: update-readme--${{ github.ref_name }}
          delete-branch: true
          labels: bot,documentation

Inputs

Name Required Default Description
file true README.md Path of the updated Markdown file.
action-file false Path of action.yml file.

Requirements

Action internally uses sed, awk and yq.

Update Action README 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

Renders Markdown tables for inputs and outputs from action.yaml file
v1.2.0
Latest

Update Action README 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.