File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed
Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff line change 1- # This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
1+ # This workflow keeps DIRECTORY.md up to date.
2+ # On protected default branches, it opens a pull request instead of pushing directly.
23name : Update Directory
34
45on :
56 push :
6- branches-ignore :
7- " master"
7+ branches :
8+ - master
9+
10+ permissions :
11+ contents : write
12+ pull-requests : write
813
914jobs :
1015 updateDirectory :
@@ -23,16 +28,14 @@ jobs:
2328 - name : 🗄️ Create Directory from JS files
2429 run : node .github/workflows/UpdateDirectory.js
2530
26- - name : Configure Github Action
27- run : |
28- git config --global user.name "$GITHUB_ACTOR"
29- git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
30-
31- - name : 🤓 Commit & push new Directory (if needed)
32- run : |
33- if [[ `git status --porcelain` ]]; then
34- git commit -am "Updated Documentation in README.md"
35- git push
36- else
37- echo "NO CHANGES DETECTED"
38- fi
31+ - name : 🤓 Open pull request for DIRECTORY.md updates (if needed)
32+ uses : peter-evans/create-pull-request@v7
33+ with :
34+ branch : ci/update-directory
35+ delete-branch : true
36+ commit-message : " chore: update DIRECTORY.md"
37+ title : " chore: update DIRECTORY.md"
38+ body : |
39+ Automated update of `DIRECTORY.md` generated by `.github/workflows/UpdateDirectory.js`.
40+ add-paths : |
41+ DIRECTORY.md
You can’t perform that action at this time.
0 commit comments