Skip to content

Fix permissions

Fix permissions #23

Workflow file for this run

name: Generate README
on: push
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 "9,100d" README.md
echo '```' >> tree.txt
cat tree.txt >> README.md
echo '=========== README.md ==========='
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 }}