mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-12-19 06:58:15 +08:00
19 lines
761 B
YAML
19 lines
761 B
YAML
# This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
|
|
name: update_directory_md
|
|
on: [push]
|
|
jobs:
|
|
update_directory_md:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions/setup-node@v1
|
|
- run: |
|
|
node .github/workflows/UpdateDirectory.js
|
|
cat DIRECTORY.md
|
|
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
|
|
git add DIRECTORY.md
|
|
git commit -am "updating DIRECTORY.md" || true
|
|
git push --force origin HEAD:$GITHUB_REF || true
|