Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions .github/workflows/UpdateDirectory.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
# This workflow keeps DIRECTORY.md up to date.
# On protected default branches, it opens a pull request instead of pushing directly.
name: Update Directory

on:
push:
branches-ignore:
"master"
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
updateDirectory:
Expand All @@ -23,16 +28,14 @@ jobs:
- name: 🗄️ Create Directory from JS files
run: node .github/workflows/UpdateDirectory.js

- name: Configure Github Action
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: 🤓 Commit & push new Directory (if needed)
run: |
if [[ `git status --porcelain` ]]; then
git commit -am "Updated Documentation in README.md"
git push
else
echo "NO CHANGES DETECTED"
fi
- name: 🤓 Open pull request for DIRECTORY.md updates (if needed)
uses: peter-evans/create-pull-request@v7
with:
branch: ci/update-directory
delete-branch: true
commit-message: "chore: update DIRECTORY.md"
title: "chore: update DIRECTORY.md"
body: |
Automated update of `DIRECTORY.md` generated by `.github/workflows/UpdateDirectory.js`.
add-paths: |
DIRECTORY.md
Loading