Update contributors #1095
This file contains hidden or 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: Update contributors | |
| on: | |
| schedule: | |
| - cron: "0 12 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| - 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@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5 | |
| 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.ORG_MEMBERS_TOKEN }} | |
| run: | | |
| pnpm install --frozen-lockfile | |
| pnpm run update-contributors | |
| pnpm run format | |
| - name: Commit files | |
| run: | | |
| git config --local user.email "gitbot@scrumplex.net" | |
| git config --local user.name "PrismAutomata" | |
| git add :/ | |
| git commit -m "Update contributors" || true | |
| - name: Create PR | |
| id: cpr | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8 | |
| with: | |
| base: "main" | |
| branch: "update-contributors" | |
| delete-branch: true | |
| title: "chore: update contributors" | |
| body: "Automated pull request to update contributors" | |
| - name: Enable Pull Request Automerge | |
| if: steps.cpr.outputs.pull-request-operation == 'created' | |
| uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3 | |
| with: | |
| pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
| merge-method: merge |