Skip to content

feat: fixed workflow file #7

feat: fixed workflow file

feat: fixed workflow file #7

name: Update Contributors
on:
pull_request:
types: [closed]
jobs:
update-contributors:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pnpm
run: npm install -g pnpm
- name: Install Dependencies
run: pnpm install
- name: Install All Contributors CLI
run: pnpm add -g all-contributors-cli
- name: Add Contributor
run: |
all-contributors add ${GITHUB_ACTOR} code
all-contributors generate
- name: Commit and Push Changes
run: |
git config --global user.name "github-actions [bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "docs: add ${GITHUB_ACTOR} as a contributor" || echo "No changes to commit"
git push