-
Notifications
You must be signed in to change notification settings - Fork 114
31 lines (26 loc) · 1.01 KB
/
issue-trigger.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
name: Issue Trigger
on:
pull_request:
types: [opened, edited]
jobs:
trigger:
runs-on: [self-hosted,zkbas]
permissions:
issues: write
pull-requests: write
steps:
- name: update-integration-keyfile
if: contains(github.event.pull_request.body, '/update-integration-keyfile') || contains(github.event.comment.body, '/update-integration-keyfile') # check the comment if it contains the keywords
run: |
cd /server
sudo rm -rf ./zkbnb
echo 'fetch zkbnb repo'
export PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
echo Pull requests $PR_NUMBER
sudo git clone https://github.com/bnb-chain/zkbnb.git
cd ./zkbnb
sudo git fetch origin pull/$PR_NUMBER/head:$GITHUB_SHA 2>/dev/null
sudo git checkout $GITHUB_SHA
sudo bash ./deployment/tool/tool.sh prepare new
sudo rm -rf /server/test.keyfile
sudo cp -r ./deployment/.zkbnb /server/test.keyfile