From 11bd7f0506edddf0a583592d2fe6172687647de8 Mon Sep 17 00:00:00 2001 From: Michael Tamaki Date: Tue, 14 Nov 2023 05:18:33 +0000 Subject: [PATCH] Update contributors.json on a monthly basis --- .github/workflows/contributors.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index e89cff2..cb5353f 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -1,8 +1,9 @@ name: Credit the contributors on: - push: {} workflow_dispatch: {} + schedule: + - cron: '0 0 1 * *' env: ORGANIZATION_NAME: "CodeWithAloha" @@ -42,10 +43,14 @@ jobs: echo "}}" >> contributors.json cat contributors.json - - name: Commit the contributors - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git add contributors.json - git commit -m "Update contributors.json" - git push + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - run: npm ci + - run: npm run lint + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + commit-message: "[bot] Update contributors.json" + title: "[bot] Update contributors.json"