Skip to content

test directory.md generator #18

test directory.md generator

test directory.md generator #18

name: Generate Directory Markdown
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: write
jobs:
generate-directory:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run Directory Tree Generator
uses: DenizAltunkapan/directory-tree-generator@v2
with:
path: src
extensions: .java
show-extensions: false
- name: Create branch, commit changes and open pull request
env:
BRANCH_NAME: update-directory-md-${{ github.run_id }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git checkout -b $BRANCH_NAME
git add DIRECTORY.md
git commit -m "chore: update DIRECTORY.md" || echo "No changes to commit"
git push origin $BRANCH_NAME
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-directory-md-${{ github.run_id }}
title: "Update DIRECTORY.md"
body: |
This pull request updates the `DIRECTORY.md` file automatically.
base: master