Skip to content

Commit 51650d4

Browse files
committed
init project.
0 parents  commit 51650d4

File tree

13 files changed

+38220
-0
lines changed

13 files changed

+38220
-0
lines changed

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ko_fi: jaywcjlove
2+
buy_me_a_coffee: jaywcjlove
3+
custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"]

.github/workflows/ci.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
16+
- run: npm install
17+
- run: npm run build
18+
- run: mkdir -p build
19+
20+
- name: Output src/ folder tree
21+
# uses: jaywcjlove/github-action-folder-tree@main
22+
uses: ./
23+
with:
24+
path: ./src
25+
26+
- name: Create idoc config
27+
run: |
28+
cat > idoc.yml << EOF
29+
site: "Folder Tree {{version}}"
30+
menus:
31+
Home: index.html
32+
Sponsor: https://jaywcjlove.github.io/#/sponsor
33+
footer: |
34+
<a href="https://jaywcjlove.github.io/#/sponsor" target="_blank">Sponsor</a> •
35+
<a href="https://jaywcjlove.github.io/changelog-generator" target="_blank">Changelog Generator</a> •
36+
<a href="https://jaywcjlove.github.io/create-tag-action" target="_blank">Create Tag</a> •
37+
<a href="https://jaywcjlove.github.io/github-action-contributors" target="_blank">Contributors</a> •
38+
<a href="https://jaywcjlove.github.io/generated-badges" target="_blank">Generated Badges</a>
39+
<br />
40+
Released under the MIT License. Copyright © {{idocYear}} Kenny Wong<br />
41+
Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a> v{{idocVersion}}
42+
43+
EOF
44+
45+
- run: npm install idoc@1 -g
46+
- run: idoc
47+
- name: gh-pages README.md
48+
working-directory: dist
49+
run: |
50+
cat > README.md << EOF
51+
Website: https://jaywcjlove.github.io/github-action-folder-tree
52+
EOF
53+
54+
- name: Is a tag/release created auto?
55+
id: create_tag
56+
uses: jaywcjlove/create-tag-action@main
57+
with:
58+
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
59+
package-path: ./package.json
60+
61+
- name: get tag version
62+
id: tag_version
63+
uses: jaywcjlove/changelog-generator@main
64+
65+
- name: Deploy
66+
uses: peaceiris/actions-gh-pages@v4
67+
with:
68+
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
69+
github_token: ${{ secrets.GITHUB_TOKEN }}
70+
publish_dir: ./dist
71+
72+
- name: Generate Changelog
73+
id: changelog
74+
uses: jaywcjlove/changelog-generator@main
75+
with:
76+
head-ref: ${{steps.create_tag.outputs.version}}
77+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
78+
79+
- name: Create Release
80+
uses: jaywcjlove/create-tag-action@main
81+
with:
82+
# test: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
83+
package-path: ./package.json
84+
release: true
85+
body: |
86+
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
87+
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/github-action-folder-tree/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
88+
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
89+
90+
${{ steps.changelog.outputs.changelog }}
91+
92+
93+
```yml
94+
- name: Read README.md
95+
id: package
96+
uses: jaywcjlove/github-action-folder-tree@main
97+
with:
98+
path: package.json
99+
100+
- name: Echo package.json
101+
run: echo "$\{{ steps.package.outputs.content }}"
102+
```
103+

.gitignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
build
2+
lib
3+
node_modules
4+
5+
npm-debug.log*
6+
lerna-debug.log
7+
yarn-error.log
8+
package-lock.json
9+
10+
.DS_Store
11+
.cache
12+
.vscode
13+
.idea
14+
.env
15+
16+
*.mpassword
17+
*.bak
18+
*.tem
19+
*.temp
20+
#.swp
21+
*.*~
22+
~*.*
23+
24+
# IDEA
25+
*.iml
26+
*.ipr
27+
*.iws
28+
.idea/

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no lint-staged

.lintstagedrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"*.ts": [
3+
"npm run build"
4+
]
5+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 小弟调调™
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Print folder tree
2+
===
3+
4+
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
5+
[![test](https://github.com/jaywcjlove/github-action-folder-tree/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/github-action-folder-tree/actions/workflows/ci.yml)
6+
7+
View the folder directory tree structure, similar to the output of the `tree` command
8+
9+
## Example Usage
10+
11+
```yml
12+
- name: Print Folder Tree
13+
uses: jaywcjlove/github-action-folder-tree@main
14+
with:
15+
path: ./src
16+
depth: 2
17+
```
18+
19+
## Inputs
20+
21+
- `path` Folder path. (default `./`)
22+
- `depth` Scan the maximum depth reachable for the given path (default `5`)
23+
24+
## Outputs
25+
26+
- `content` Directory tree structure text
27+
28+
## See Also
29+
30+
- [Github Release Changelog Generator](https://github.com/jaywcjlove/changelog-generator) A GitHub Action that compares the commit differences between two branches
31+
- [Create Tags From](https://github.com/jaywcjlove/create-tag-action) Auto create tags from commit or package.json.
32+
- [Github Action Contributors](https://github.com/jaywcjlove/github-action-contributors) Github action generates dynamic image URL for contributor list to display it!
33+
- [Generated Badges](https://github.com/jaywcjlove/generated-badges) Create a badge using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers)
34+
- [Create Coverage Badges](https://github.com/jaywcjlove/coverage-badges-cli) Create coverage badges from coverage reports. (no 3rd parties servers)
35+
- [Github Action package](https://github.com/jaywcjlove/github-action-package) Read and modify the contents of `package.json`.
36+
- [Github Action EJS](https://github.com/jaywcjlove/github-action-package) A github action to render a ejs template using github context.
37+
- [Modify File Content](https://github.com/jaywcjlove/github-action-modify-file-content) Replace text content and submit content.
38+
39+
## License
40+
41+
Licensed under the MIT License.

action.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'Print folder tree'
2+
author: 'Kenny Wong'
3+
description: 'View the folder directory tree structure, similar to the output of the `tree` command'
4+
inputs:
5+
token:
6+
description: 'Your GITHUB_TOKEN'
7+
default: ${{ github.token }}
8+
required: false
9+
path:
10+
description: 'Folder path'
11+
default: ''
12+
required: false
13+
depth:
14+
description: 'Scan the maximum depth reachable for the given path'
15+
default: 5
16+
required: false
17+
18+
outputs:
19+
content:
20+
description: 'Directory tree structure text'
21+
22+
runs:
23+
using: 'node20'
24+
main: 'dist/index.js'
25+
26+
branding:
27+
icon: 'file'
28+
color: 'purple'

0 commit comments

Comments
 (0)