GithubHelp home page GithubHelp logo

makeshift / auto-doc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andreas-aman/auto-doc

0.0 1.0 0.0 473 KB

:octocat: Github action/CLI to convert your GitHub actions.yml to markdown.

License: Apache License 2.0

Go 93.18% Makefile 6.82%

auto-doc's Introduction

Codacy Badge Coverage codecov Go Reference Go Report Card CI Update release version. Public workflows that use this action.

Ubuntu Mac OS Windows

auto-doc

Generate documentation for your actions.(yml|yaml).

Table of Contents

Usage

Add the Inputs and/or Outputs H2 header to any markdown file.

...
    steps:
      - uses: actions/checkout@v2
      - name: Run auto-doc
        uses: tj-actions/[email protected]

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
action string false "action.yml" Path to the action.yml file
bin_path string false Path to the auto-doc binary
col_max_width string false "1000" Max width of a column
col_max_words string false "6" Max number of words per line
in a column
input_columns string false List of Input columns names to
display, default (display all columns)
output string false "README.md" Path to the output file
output_columns string false List of Output column names to
display, default (display all columns)

๐Ÿ‘† This is generated ๐Ÿ‘† using ๐Ÿ‘‰ action.yml

Examples

Create a pull request each time the action.yml inputs/outputs change

name: Update README.md with the latest actions.yml

on:
  push:
    branches:
      - main

jobs:
  update-doc:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
         uses: actions/[email protected]
         with:
           fetch-depth: 0  # otherwise, you will failed to push refs to dest repo

       - name: Run auto-doc
         uses: tj-actions/[email protected]

       - name: Verify Changed files
         uses: tj-actions/[email protected]
         id: verify-changed-files
         with:
           files: |
             README.md

       - name: Create Pull Request
         if: steps.verify-changed-files.outputs.files_changed == 'true'
         uses: peter-evans/create-pull-request@v3
         with:
           base: "main"
           title: "auto-doc: Updated README.md"
           branch: "chore/auto-doc-update-readme"
           commit-message: "auto-doc: Updated README.md"
           body: "auto-doc: Updated README.md"

CLI

Installation

Run

go install github.com/tj-actions/auto-doc@latest

Synopsis

Auto generate documentation for your github action.

auto-doc [flags]

Options

      --action string               action config file (default "action.yml")
      --colMaxWidth string          Max width of a column (default "1000")
      --colMaxWords string          Max number of words per line in a column (default "5")
  -h, --help                        help for auto-doc
      --inputColumns stringArray    list of input column names (default [Input,Type,Required,Default,Description])
      --output string               Output file (default "README.md")
      --outputColumns stringArray   list of output column names (default [Output,Type,Description])

If you feel generous and want to show some extra appreciation:

Buy me a coffee

Credits

This package was created with Cookiecutter using cookiecutter-action

Report Bugs

Report bugs at https://github.com/tj-actions/auto-doc/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

auto-doc's People

Contributors

actions-user avatar codacy-badger avatar dependabot[bot] avatar github-actions[bot] avatar jackton1 avatar renovate-bot avatar renovate[bot] avatar repo-ranger[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.