Skip to content

Update contributors #75

Update contributors

Update contributors #75

name: Update contributors
on:
schedule:
- cron: "0 12 * * *"
workflow_dispatch: # allow manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies & update contributors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm install --frozen-lockfile
pnpm run update-contributors
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "PrismAutomata"
git commit -m "Update contributors" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}