forked from nnstreamer/nntrainer
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1.07 KB
/
Upload.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
name: Upload Data
on:
pull_request:
types: [opened, edited, reopened, synchronize]
pull_request_review:
types: [edited, dismissed, submitted]
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: review_count
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
IS_CONTAIN: ${{ contains(github.event.pull_request.labels.*.name, 'Need Review') }}
id: review_count
run: |
review=$(curl -s -H "Accept: application/vnd.github.black-cat-preview+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \
| jq '[ .[] | select(.state=="APPROVED") | .user.login ] | unique | length')
echo "Number of approved review_count: $review"
echo "CONTAIN=$IS_CONTAIN"
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
echo $review > ./pr/review_num
echo $IS_CONTAIN > ./pr/contain_bool
- uses: actions/upload-artifact@v3
with:
name: pr_number
path: pr/