Skip to content

Update contributors #49

Update contributors

Update contributors #49

name: Update contributors
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 2,5"
permissions:
actions: write
contents: write
pull-requests: write
jobs:
update-contributors:
name: Update contributors
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: ".node-version"
- name: Update contributors
run: node scripts/update-contributors.js --token=${{ secrets.GITHUB_TOKEN }}
- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
branch: chore/update-contributors
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
title: "chore(ci): update contributors"
commit-message: "chore(ci): update contributors"
body: ""
labels: CI-Contributors
- name: Auto merge
if: ${{ steps.create-pull-request.outputs.pull-request-operation != 'closed' && steps.create-pull-request.outputs.pull-request-number != '' }}
run: gh pr merge --squash --auto --delete-branch ${{ steps.create-pull-request.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}