diff --git a/.github/workflows/update_contributors.yml b/.github/workflows/update_contributors.yml new file mode 100644 index 00000000..6a6b788c --- /dev/null +++ b/.github/workflows/update_contributors.yml @@ -0,0 +1,33 @@ +name: Update Contributors + +on: + push: + branches-ignore: + - main + paths: + - '.all-contributorsrc' + +jobs: + generate-markdown-and-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Set up tool + run: npm install -g all-contributors-cli@6.24.0 + - name: Generate file + id: generate + run: npx all-contributors generate + - name: commit-and-push + id: candp + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: '[AUTOMATED] update CONTRIBUTORS.md' + file_pattern: 'CONTRIBUTORS.md' + commit_user_name: github-actions[bot] + - name: Echo Results + if: steps.candp.outputs.changes_detected == 'true' + run: echo "changes detected and committed."