Generate contributors #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Generate contributors" | |
on: | |
schedule: | |
- cron: "0 0 1 * *" | |
env: | |
PRIMARY_NODE_VERSION: 12 | |
jobs: | |
generate-contributors: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.PRIMARY_NODE_VERSION }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: | | |
yarn --ignore-engines --frozen-lockfile --ignore-scripts | |
- name: Generate contributors | |
run: yarn generate-contributors | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
# The standard GITHUB_TOKEN cannot be used as it will not trigger status checks on | |
# the PR that gets created (this behavior is not specific to this action). | |
# https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
token: ${{ secrets.JAMES_HENRY_GH_TOKEN }} | |
commit-message: "chore: update contributors" | |
title: "chore: update contributors" | |
body: "" | |
branch: auto-update-contributors |