File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
- name : Generate Directory Markdown
1
+ name : Generate Directory Markdown
2
2
3
3
on :
4
4
push :
7
7
8
8
permissions :
9
9
contents : write
10
+ pull-requests : write
10
11
11
12
jobs :
12
13
generate-directory :
@@ -22,12 +23,19 @@ jobs:
22
23
extensions : .java
23
24
show-extensions : false
24
25
25
- - name : Commit and Push DIRECTORY.md
26
+ - name : Commit changes
26
27
run : |
27
- cat DIRECTORY.md
28
28
git config --global user.name "$GITHUB_ACTOR"
29
29
git config --global user.email "[email protected] "
30
- git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
31
30
git add DIRECTORY.md
32
- git commit -am "Update directory" || true
33
- git push origin HEAD:$GITHUB_REF
31
+ git diff --cached --quiet || git commit -m "Update DIRECTORY.md"
32
+
33
+ - name : Create Pull Request
34
+ uses : peter-evans/create-pull-request@v5
35
+ with :
36
+ branch : update-directory
37
+ base : master
38
+ title : " Update DIRECTORY.md"
39
+ body : " Automatically generated update of the directory tree."
40
+ commit-message : " Update DIRECTORY.md"
41
+ draft : false
You can’t perform that action at this time.
0 commit comments