1.0.17 • Published 4 years ago
markdown-autodocs-test v1.0.17
A GitHub Action for auto documenting workflow artifacts table in README.md.
Usage in markdown
Usage in workflow
Add the following step at the end of your job, after other steps that might add or change files.
Add example repo:
- Add example repo and example youtube video.
# Autodoc workflow artifacts in ./README.md
- uses: dineshsonachalam/markdown-autodocs-test@v2
# To commit the updated ./README.md and push them back to the GitHub repository
- uses: stefanzweifel/git-auto-commit-action@v4
# or use: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
The following is an extended example with all possible options available for this Action.
- uses: dineshsonachalam/markdown-autodocs-test@v2
with:
# Optional branch name where commit should be pushed to.
# Defaults to the current branch.
branch: feature-123
# Optional local file path to the README.md.
# Defaults to the root of the repository (`./README.md`)
input_file_path: ./README.md
Example Workflow
name: markdown-autodocs-test
on:
workflow_run:
workflows:
- publish-to-npm
types:
- completed
jobs:
autoupdate-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dineshsonachalam/markdown-autodocs-test@v2
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Autodoc workflow artifactsTable
branch: ${{ github.head_ref }}
file_pattern: README.md
Artifacts
License
Example (Code block):
name: markdown-autodocs-test
on:
workflow_run:
workflows:
- publish-to-npm
types:
- completed
jobs:
autoupdate-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Autodoc workflow artifacts
branch: ${{ github.head_ref }}
file_pattern: README.md
Example (JSON to HTML table):
Example (ARTIFACTS TABLE)
Todo:
- Use python argparse cli to parse and execute cli.
- It should also run git commands.
Reference: https://realpython.com/python-command-line-arguments/#the-python-standard-library