Skip to content

Update Contributors #65

Update Contributors

Update Contributors #65

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: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Install dependencies
run: pnpm install
- name: Run script
run: pnpm 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 Action'
git config user.email '[email protected]'
git add .
git commit -m "chore: auto-update contributors list"
git push