create Repo-Tree structure in README by Zheng-Bote #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Repo - create Repo-Tree in README.md | |
# description: document file-strcuture of repo | |
# README.md: <!-- readme-tree start --><!-- readme-tree end --> | |
# https://github.com/RavelloH/readme-tree | |
run-name: create Repo-Tree structure in README by ${{ github.actor }} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "README.md" | |
permissions: | |
checks: write | |
contents: write | |
jobs: | |
sync-assets: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Tree | |
uses: RavelloH/[email protected] | |
- name: Run test | |
uses: tj-actions/remark@v3 | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v20 | |
id: verify_changed_files | |
with: | |
files: | | |
README.md | |
- name: README.md changed | |
if: steps.verify_changed_files.outputs.files_changed == 'true' | |
run: | | |
echo "README.md has uncommitted changes" | |
#exit 1 | |
- name: commit and push | |
if: steps.verify_changed_files.outputs.files_changed == 'true' | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
push-branch: "main" | |
commit-message: "appended by Github Actions" | |
force-add: "true" | |
files: README.md | |
name: "github-actions[bot]" | |
email: "github-actions[bot]@users.noreply.github.com" |