Repository Indexer #193
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Repository Indexer | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0,12 * * *" | |
| permissions: | |
| contents: write | |
| jobs: | |
| index: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Generate index file | |
| run: | | |
| rm -f index | |
| find . -type f \ | |
| -not -path "./.git/*" \ | |
| -not -name "index" \ | |
| | sort > index | |
| - name: Commit & push index | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "actions@github.com" | |
| git add index | |
| git diff --cached --quiet || git commit -m "chore: update index" | |
| git push |