-
Notifications
You must be signed in to change notification settings - Fork 19
104 lines (87 loc) · 2.72 KB
/
pull_request.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: ✨ pull request
on:
pull_request:
permissions:
id-token: write
contents: read
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup_pull_request:
name: 🤖 setup pull request
runs-on: public-ledgerhq-shared-small
timeout-minutes: 10
steps:
- name: Checkout
timeout-minutes: 10
uses: actions/checkout@v4
- name: Add labels
timeout-minutes: 5
uses: actions/labeler@v5
- name: Enforce labels
timeout-minutes: 5
uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: |
documentation
specifications
descriptors
ci
add_comment: true
validate_descriptors:
name: 🔎 validate descriptors
runs-on: public-ledgerhq-shared-small
timeout-minutes: 60
steps:
- name: Checkout
timeout-minutes: 10
uses: actions/checkout@v4
- name: Add labels
timeout-minutes: 5
uses: actions/labeler@v5
- name: Enforce labels
timeout-minutes: 5
uses: mheap/github-action-required-labels@v5
with:
add_comment: true
mode: minimum
count: 1
labels: |
documentation
specifications
descriptors
ci
- name: Get all changed descriptor files
timeout-minutes: 5
id: changed-descriptor-files
uses: tj-actions/changed-files@v45
with:
files: |
registry/**/eip712-*.json
registry/**/calldata-*.json
- name: Setup python
timeout-minutes: 10
if: steps.changed-descriptor-files.outputs.any_changed == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Login to Ledger JFrog
timeout-minutes: 10
if: steps.changed-descriptor-files.outputs.any_changed == 'true'
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1
- name: Setup pip
timeout-minutes: 10
if: steps.changed-descriptor-files.outputs.any_changed == 'true'
run: jf pipc --global --repo-resolve=virtual-pypi-prod-green
- name: Install ERC-7730 library
timeout-minutes: 10
if: steps.changed-descriptor-files.outputs.any_changed == 'true'
run: jf pip install erc7730
- name: Validate ERC-7730 descriptors changed in pull request
timeout-minutes: 10
if: steps.changed-descriptor-files.outputs.any_changed == 'true'
run: erc7730 lint ${{ steps.changed-descriptor-files.outputs.all_changed_files }} --gha