diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..fb327d8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Update Contributors + +on: + push: + branches: + - main + schedule: + - cron: "0 0 * * 0" # Runs every Sunday at midnight + +jobs: + update-contributors: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Update Contributors Section in README + uses: contributors/readme-action@v2.3.10 + with: + use_username: true + columns_per_row: 8 + image_size: 75 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Commit and Push Changes + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add README.md + git diff --quiet || git commit -m "Update contributors list" + git push diff --git a/README.md b/README.md index 2f45a01..25a6362 100644 --- a/README.md +++ b/README.md @@ -133,14 +133,29 @@ npm start 7. **Open a Pull Request:** - Go to the GitHub page of your forked repository, and you should see an option to create a pull request. Click on it, provide a descriptive title and description for your pull request, and then submit it. -