-
-
Notifications
You must be signed in to change notification settings - Fork 82
44 lines (37 loc) · 1.46 KB
/
update-contributors.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }}