From 6c2e775f323a3a4a5c280fc2023164816bd48aea Mon Sep 17 00:00:00 2001 From: Jack Blake Date: Thu, 18 Jan 2024 00:34:45 -0500 Subject: [PATCH] update ngrok setup --- .github/workflows/run.yaml | 16 ++++++++++------ ngrok-config.yaml | 9 +++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 ngrok-config.yaml diff --git a/.github/workflows/run.yaml b/.github/workflows/run.yaml index 01beb07..923c52b 100644 --- a/.github/workflows/run.yaml +++ b/.github/workflows/run.yaml @@ -3,12 +3,11 @@ on: [workflow_dispatch] jobs: run-server: name: run mc serv and open ngrok tunnel - runs-on: ubuntu-latest - if: ${{ always() }} + runs-on: ubuntu-20.04 steps: - name: start mc server container run: | - docker run -itd --name mcserv --rm \ + docker run -itd --name mc --rm \ -p 25565:25565 \ -e START_COMMAND="${{ vars.START_COMMAND }}" \ -e S3_BUCKET_NAME=${{ vars.S3_BUCKET_NAME }} \ @@ -17,10 +16,15 @@ jobs: -e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \ -e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ ${{ github.event.act && 'localhost:8080' || 'ghcr.io' }}/${{ vars.IMAGE_REPO }}:latest - - name: install and configure ngrok + - name: install ngrok run: | wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-${{ vars.ARCHITECTURE || 'amd64' }}.tgz tar -xvf ngrok-v3-stable-linux-${{ vars.ARCHITECTURE || 'amd64' }}.tgz - ./ngrok config add-authtoken ${{ secrets.NGROK_AUTHTOKEN }} + # - name: setup ssh server + # run: | + # echo "${{ secrets.PUBLIC_KEY }}" >> ~/.ssh/authorized_keys + # sudo chmod -R go= ~/.ssh + # service ssh restart + - uses: actions/checkout@v2 - name: open ngrok tunnel - run: ./ngrok tcp 25565 --log stdout \ No newline at end of file + run: ./ngrok start --all --config ngrok-config.yaml --authtoken ${{ secrets.NGROK_AUTHTOKEN }} \ No newline at end of file diff --git a/ngrok-config.yaml b/ngrok-config.yaml new file mode 100644 index 0000000..96e23da --- /dev/null +++ b/ngrok-config.yaml @@ -0,0 +1,9 @@ +tunnels: + # ssh: + # proto: tcp + # addr: 22 + mc: + proto: tcp + addr: 25565 +log: stdout +version: "2" \ No newline at end of file