Skip to content

cleanup(contributors-script): remove unnecessary code and handle http errors #31

cleanup(contributors-script): remove unnecessary code and handle http errors

cleanup(contributors-script): remove unnecessary code and handle http errors #31

name: Update Contributors
on:
schedule:
- cron: '0 0 * * 0'
pull_request:
workflow_dispatch:
env:
token: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm install
- name: Run script
run: npm run start
- uses: actions/upload-artifact@v4
with:
name: contributors.json
path: contributors.json
- name: Commit and push if it changed
if: github.repository == 'Vanilla-OS/.github' && github.ref == 'refs/heads/main'
continue-on-error: true
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "chore: update contributors list"
git push