-
Notifications
You must be signed in to change notification settings - Fork 57
62 lines (59 loc) · 2.11 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
52
53
54
55
56
57
58
59
60
61
62
name: "Check signature"
on:
pull_request_target:
types: [opened, edited, synchronize, reopened]
paths:
- assets/**
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
Logo Format Error
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: Waiting Signature Verifier
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
base_sha: ${{ github.event.pull_request.base.sha }}
sha: ${{ github.event.pull_request.head.sha }}
- name: Check signature
uses: ./.github/actions/checker
if: success()
id: signature
with:
pr_sha: ${{ github.event.pull_request.head.sha }}
pr_num: ${{ github.event.pull_request.number }}
github_token: ${{ secrets.GITHUB_TOKEN }}
changed_files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
subscan_apikey: ${{ 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 when logo format error
uses: actions-ecosystem/action-add-labels@v1
if: failure() && steps.signature.outputs.logoVerified == 'false'
with:
labels: Logo Format Error
- name: Label remove when disapproved
uses: actions-ecosystem/action-add-labels@v1
if: failure() || steps.signature.outputs.verified == 'false'
with:
labels: Signature Not-Verified