Skip to content

Commit

Permalink
add build_directory.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquencmt committed Apr 11, 2024
1 parent d85a8df commit e3ae61a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build_directory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build DIRECTORY.md
on: [push, pull_request]

jobs:
main:
name: Update DIRECTORY.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Setup Git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Update DIRECTORY.md file
run: |
wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/build_directory_md.py
python3 build_directory_md.py Zig . .zig build.zig > DIRECTORY.md
- name: Commit changes
run: |
git diff
git commit -m "Update DIRECTORY.md" DIRECTORY.md || true
git push --force origin HEAD:$GITHUB_REF || true
Empty file added DIRECTORY.md
Empty file.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#### Project

* [Algorithms](DIRECTORY.md)
* [Contributing](CONTRIBUTING.md)
* [Code of Conduct](CODE_OF_CONDUCT.md)

Expand Down

0 comments on commit e3ae61a

Please sign in to comment.