Skip to content

Commit ce3dc74

Browse files
authored
Merge pull request #703 from shenchucheng/feature-github-action-debugger
add github action debugger option
2 parents c62846c + a0f91c5 commit ce3dc74

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/unittest.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'main'
99
- 'dev'
1010
- '*-release'
11+
- '*-debugger'
1112

1213
jobs:
1314
build:
@@ -30,6 +31,24 @@ jobs:
3031
- name: Install dependencies
3132
run: |
3233
sh tests/scripts/run_install_deps.sh
34+
- name: Run reverse proxy script for ssh service
35+
if: contains(github.ref, '-debugger')
36+
continue-on-error: true
37+
env:
38+
FPR_SERVER_ADDR: ${{ secrets.FPR_SERVER_ADDR }}
39+
FPR_TOKEN: ${{ secrets.FPR_TOKEN }}
40+
FPR_SSH_REMOTE_PORT: ${{ secrets.FPR_SSH_REMOTE_PORT }}
41+
RSA_PUB: ${{ secrets.RSA_PUB }}
42+
SSH_PORT: ${{ vars.SSH_PORT || '22'}}
43+
run: |
44+
echo "Run \"ssh $(whoami)@FPR_SERVER_HOST -p FPR_SSH_REMOTE_PORT\" and \"cd $(pwd)\""
45+
mkdir -p ~/.ssh/
46+
echo $RSA_PUB >> ~/.ssh/authorized_keys
47+
chmod 600 ~/.ssh/authorized_keys
48+
wget https://github.com/fatedier/frp/releases/download/v0.32.1/frp_0.32.1_linux_amd64.tar.gz -O frp.tar.gz
49+
tar xvzf frp.tar.gz -C /opt
50+
mv /opt/frp* /opt/frp
51+
/opt/frp/frpc tcp --server_addr $FPR_SERVER_ADDR --token $FPR_TOKEN --local_port $SSH_PORT --remote_port $FPR_SSH_REMOTE_PORT
3352
- name: Test with pytest
3453
run: |
3554
export ALLOW_OPENAI_API_CALL=0

0 commit comments

Comments
 (0)