-
Notifications
You must be signed in to change notification settings - Fork 345
44 lines (42 loc) · 1.32 KB
/
count-task-completion.yml
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: Count task completion when PR merged
on:
# 这种触发方式总是报错,暂时排查不出具体原因,先注释掉
# pull_request:
# types: [closed]
# branches:
# - main
# paths:
# - members/*/**
workflow_dispatch:
jobs:
count:
# if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
REPO_NAME: openbuildxyz/Web3-Frontend-Bootcamp
REPO_BRANCH: main
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
repository: ${{ env.REPO_NAME }}
ref: ${{ env.REPO_BRANCH }}
# token: ${{ secrets.GH_TOKEN }}
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 14.15.3
- name: Count task completion
run: node scripts/count.js
- name: Commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "chore: update counted task completion"
- uses: ad-m/github-push-action@master
with:
repository: ${{ env.REPO_NAME }}
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ env.REPO_BRANCH }}