-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 2.17 KB
/
ci.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
name: Check helix relayer config
on:
pull_request:
# branches:
# - main
env:
HELIXBRIDGE_CLI_VERSION: sha-3e9ff58
jobs:
check:
name: Check changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: _${{ github.base_ref }}_
- name: Check register
run: |
docker run -i --rm \
--name helixbridge \
-v $PWD:/relayer \
-e FORCE_COLOR=1 \
-e SIGNER=${{ secrets.SIGNER }} \
ghcr.io/helix-bridge/helixbridge-cli:${HELIXBRIDGE_CLI_VERSION} \
register --verbose --datadir=/relayer --group=itering
- name: Check configure
run: |
docker run -i --rm \
--name helixbridge \
-v $PWD:/relayer \
-e FORCE_COLOR=1 \
-e SIGNER=${{ secrets.SIGNER }} \
ghcr.io/helix-bridge/helixbridge-cli:${HELIXBRIDGE_CLI_VERSION} \
generate-configure --verbose --datadir=/relayer --group=itering
- uses: int128/diff-action@v1
with:
base: _${{ github.base_ref }}_/outputs
head: outputs
- name: Build comment
run: |
COMMENT_FILE='comment-configurate.md';
echo 'configure changes:' >> $COMMENT_FILE
for f in $(ls outputs/configure/*.json); do
echo "<details>" >> $COMMENT_FILE
echo "<summary>${f}</summary>" >> $COMMENT_FILE
echo '' >> $COMMENT_FILE
echo '```json' >> $COMMENT_FILE
cat $f >> $COMMENT_FILE
echo '' >> $COMMENT_FILE
echo '```' >> $COMMENT_FILE
echo '</details>' >> $COMMENT_FILE
echo '' >> $COMMENT_FILE
done
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: configure changes
- name: Comment configurate
uses: GrantBirki/comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
file: comment-configurate.md
edit-mode: replace