-
Notifications
You must be signed in to change notification settings - Fork 135
46 lines (46 loc) · 1.41 KB
/
validate.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
name: Validate Gentx
on:
push:
pull_request:
branches:
- main
jobs:
changes:
runs-on: ubuntu-20.04
outputs:
gentx_files: ${{ steps.gentx.outputs.gentx_files }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: check file changes
id: check
run: |
echo "changed_files=$(git diff --name-status -r HEAD^1 HEAD |grep -v ^D |grep "archway-1/gentx" |cut -f2)" >> $GITHUB_OUTPUT
- name: Check for gentxs
id: gentx
run: |
if [ ! -z "${{ steps.check.outputs.changed_files }}" ]; then
for file in "${{ steps.check.outputs.changed_files }}"; do
echo "gentx_files=$file" >> $GITHUB_OUTPUT
done
fi
Validation:
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.gentx_files != null }}
steps:
- uses: actions/checkout@v3
- name: Install Archwayd binary
run: |
wget https://github.com/archway-network/archway/releases/download/v1.0.0/archwayd_linux_amd64
mv archwayd_linux_amd64 archwayd
chmod +x archwayd
- name: Test the binary
run: ./archwayd version
- name: Validate gentx
run: |
chmod +x scripts/genesis-validate.sh
for file in "${{ needs.changes.outputs.gentx_files }}"; do
scripts/genesis-validate.sh $file
done