Skip to content

Commit

Permalink
Merge pull request #16 from shaowenchen/main
Browse files Browse the repository at this point in the history
feature: add tunnels for ngrok
  • Loading branch information
shaowenchen authored Jan 19, 2021
2 parents 5398da4 + 9ff2db5 commit fcfd438
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 5,889 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- uses: shaowenchen/debugger-action@v1
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
frp_server_addr: ${{ secrets.FRP_SERVER_ADDR }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
frp_server_addr: ${{ secrets.FRP_SERVER_ADDR }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: helm/kind-action@v1.0.0-rc.1
- uses: shaowenchen/debugger-action@v1
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
frp_server_addr: ${{ secrets.FRP_SERVER_ADDR }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
frp_server_addr: ${{ secrets.FRP_SERVER_ADDR }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
ngrok_token: ${{ secrets.NGROK_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
ngrok_token: ${{ secrets.NGROK_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: helm/kind-action@v1.0.0-rc.1
- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
ngrok_token: ${{ secrets.NGROK_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
timeout-minutes: 300
continue-on-error: true
with:
ngrok_token: ${{ secrets.NGROK_TOKEN }}
6 changes: 6 additions & 0 deletions .github/workflows/ngrok.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ jobs:
continue-on-error: true
with:
ngrok_token: ${{ secrets.NGROK_TOKEN }}
ngrok_addr_1: 30000
ngrok_proto_1: tcp
ngrok_addr_2: 30001
ngrok_proto_2: tcp
ngrok_addr_3: 30002
ngrok_proto_3: tcp
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Two types of proxies are supported:
3. Run your workflow and login the runner
In the log of GitHub Actions, you can see that:
In the log of GitHub Actions, find **localhost:8000** and you can see that:
```txt
t=2021-01-19T03:57:10+0000 lvl=info msg="started tunnel" obj=tunnels name=command_line addr=//localhost:8000 url=tcp://2.tcp.ngrok.io:16400
Expand Down Expand Up @@ -61,6 +61,29 @@ work

**Required** Authenticate to ngrok agent.

#### `ngrok_proto_{x}` and `ngrok_proto_{x}`

x in [1, 2, 3] , e.g:

```yaml
- uses: shaowenchen/debugger-action@v2
name: debugger
timeout-minutes: 30
continue-on-error: true
with:
ngrok_token: ${{ secrets.NGROK_TOKEN }}
ngrok_addr_1: 30000
ngrok_proto_1: tcp
ngrok_addr_2: 30001
ngrok_proto_2: tcp
ngrok_addr_3: 30002
ngrok_proto_3: tcp
```
It will expose these services to Ngrok. The maximum number of tunnels is 3, and http will take up 2 .
####
## How to use by Frp Server
### Prerequisites
Expand Down
24 changes: 24 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ inputs:
required: false
description: 'ngrok token'
default: ''
ngrok_addr_1:
required: false
description: 'ngrok addr 1 to tunnel'
default: ''
ngrok_proto_1:
required: false
description: 'ngrok proto 1 to tunnel'
default: ''
ngrok_addr_2:
required: false
description: 'ngrok addr 2 to tunnel'
default: ''
ngrok_proto_2:
required: false
description: 'ngrok proto 2 to tunnel'
default: ''
ngrok_addr_3:
required: false
description: 'ngrok addr 3 to tunnel'
default: ''
ngrok_proto_3:
required: false
description: 'ngrok proto 3 to tunnel'
default: ''
runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit fcfd438

Please sign in to comment.