Change start line in readme #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: Readme | |
on: workflow_dispatch | |
jobs: | |
generate-tree: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Running script | |
run: | | |
tree --noreport -I 'README.md|LICENSE|tree.txt' > tree.txt | |
sed -i "15,100d" README.md | |
echo '```' >> tree.txt | |
cat tree.txt >> README.md | |
- name: Showing result | |
- run: cat README.md | |
- name: Commit files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -am "Update tree" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |