name: Update Contributors Hall of Fame on: # Trigger when PRs are merged to main (push to main branch) push: branches: - main # Trigger when pull requests are closed (merged) pull_request: types: [closed] branches: - main # Run daily at midnight UTC to catch any missed updates schedule: - cron: '0 0 * * *' # Allow manual trigger for on-demand updates workflow_dispatch: jobs: update-contributors: # Only run if push to main, scheduled, manual trigger, or PR merged to main if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Update Contributors Hall of Fame uses: akhilmhdh/contributors-readme-action@v2.3.6 with: readme_path: "CONTRIBUTORS.md" image_size: 100 columns_per_row: 7 use_username: true commit_message: "docs: update contributors list" committer_username: "github-actions[bot]" committer_email: "github-actions[bot]@users.noreply.github.com" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}