-
Notifications
You must be signed in to change notification settings - Fork 73
51 lines (47 loc) · 1.57 KB
/
sign_checker.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
45
46
47
48
49
50
51
name: "Check signature"
on:
pull_request_target:
types: [opened, edited, synchronize, reopened]
paths:
- networks/**
jobs:
check_pr:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: |
Signature Verified
Signature Not-Verified
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: Waiting Signature Verifier
- uses: actions/checkout@v2
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
- name: Check signature
uses: ./.github/actions/checker
if: success()
id: signature
with:
sha: ${{ github.event.pull_request.head.sha }}
prNum: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
filenames: ${{ steps.changed-files.outputs.all_changed_files }}
subscanAPIKey: ${{ secrets.SUBSCAN_APIKEY }}
- uses: actions-ecosystem/action-remove-labels@v1
if: always()
with:
labels: Waiting Signature Verifier
- name: Label when approved
uses: actions-ecosystem/action-add-labels@v1
if: success() && steps.signature.outputs.verified == 'true'
with:
labels: Signature Verified
- name: Label remove when disapproved
uses: actions-ecosystem/action-add-labels@v1
if: failure() || steps.signature.outputs.verified == 'false'
with:
labels: Signature Not-Verified