forked from haqq-network/validators-contest
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 989 Bytes
/
main.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
name: CI
on:
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 14.18.1
- id: files
name: Check gentx
uses: jitterbit/get-changed-files@v1
with:
format: 'json'
- run: |
readarray -t added_modified_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')"
if [[ ${#added_modified_files[@]} > 1 ]]; then
echo "More than one file found"
exit 1
fi
for added_modified_file in ${added_modified_files[@]}; do
node gentx_checker.js ${added_modified_file}
done