Fetch Contributors #88
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: Fetch Contributors | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Runs daily at midnight | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| fetch-contributors: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Fetch contributors | |
| run: | | |
| curl -s https://api.github.com/repos/Mistium/Origin-OS/contributors > contributors.json | |
| - name: Commit changes if any | |
| run: | | |
| git config --global user.name 'GitHub Actions' | |
| git config --global user.email 'actions@github.com' | |
| git add contributors.json | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Update contributors list" | |
| git push |