mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-12-19 06:58:15 +08:00
merge: Update directory workflow (#1000)
* chore: update directory workflow
Workflow now only runs on `pull_request` to prevent pushing on the master branch.
* chore: update commit mechanism
* chore: remove rundundant script
* Update UpdateDirectory.yml
* Updated Documentation in README.md
* Update UpdateDirectory.yml
* fix: replace wrong variable
* Updated Documentation in README.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
17
.github/workflows/UpdateDirectory.yml
vendored
17
.github/workflows/UpdateDirectory.yml
vendored
@@ -3,8 +3,8 @@ name: Update Directory
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
branches-ignore:
|
||||
"master"
|
||||
|
||||
jobs:
|
||||
updateDirectory:
|
||||
@@ -22,9 +22,16 @@ jobs:
|
||||
- name: 🗄️ Create Directory from JS files
|
||||
run: node .github/workflows/UpdateDirectory.mjs
|
||||
|
||||
- name: 🤓 Commit & push new Directory (if needed)
|
||||
- name: Configure Github Action
|
||||
run: |
|
||||
git config --global user.name github-actions
|
||||
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
.github/workflows/CommitAndPushDirectory.sh
|
||||
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user