Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
file

GitHub Action

Print folder tree

v1.1.0

Print folder tree

file

Print folder tree

View the folder directory tree structure, similar to the output of the `tree` command

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Print folder tree

uses: jaywcjlove/[email protected]

Learn more about this action in jaywcjlove/github-action-folder-tree

Choose a version

Print Folder Tree

Buy me a coffee test

View the folder directory tree structure, similar to the output of the tree command

Example Usage

- name: Print Folder Tree
  uses: jaywcjlove/github-action-folder-tree@main
  with:
    exclude: "node_modules|dist|.git|.husky"
    path: ./src
    depth: 2

Output Project Structure

├── .lintstagedrc
├── LICENSE
├── README.md
├── action.yml
├─> build
├── package-lock.json
├── package.json
├── renovate.json
├─> src
│   └── index.ts
└── tsconfig.json
- name: Print Folder Tree
  uses: jaywcjlove/github-action-folder-tree@main
  id: tree
  with:
    exclude: "node_modules|dist|.git|.husky"
    path: ./src
    depth: 2

- name: Modify README.md
  uses: jaywcjlove/github-action-modify-file-content@main
  with:
    path: README.md
    body: ${{ steps.tree.outputs.content }}

Inputs

  • path Folder path. (default ./)
  • depth Scan the maximum depth reachable for the given path (default 5)
  • exclude Pass a regex string to exclude directories from printing

Outputs

  • content Directory tree structure text

See Also

License

Licensed under the MIT License.