forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.13 KB
/
update-directorymd.yml
File metadata and controls
42 lines (36 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Generate Directory Markdown
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
generate-directory:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Run Directory Tree Generator
uses: DenizAltunkapan/directory-tree-generator@v2
with:
path: src
extensions: .java
show-extensions: false
- name: Commit changes
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add DIRECTORY.md
git diff --cached --quiet || git commit -m "Update DIRECTORY.md"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
branch: update-directory
base: master
title: "Update DIRECTORY.md"
body: "Automatically generated update of the directory tree."
commit-message: "Update DIRECTORY.md"
draft: false