Skip to content

Add Profile

Add Profile #1

name: Add Contributor on Issue
on:
issues:
types: [opened]
jobs:
add-contributor:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Run script to add contributor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install -g jsonfile
node .github/scripts/addContributor.js "${{ github.event.issue.user.login }}" "${{ github.event.issue.body }}"
- 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 .
git commit -m "Add contributor: ${{ github.event.issue.user.login }}"
git push