Browse Source

use cloudflare tunnel to test

neil 4 years ago
parent
commit
bf9b33acec
1 changed files with 13 additions and 4 deletions
  1. 13 4
      .github/workflows/LetsEncrypt.yml

+ 13 - 4
.github/workflows/LetsEncrypt.yml

@@ -109,11 +109,20 @@ jobs:
       TEST_LOCAL: 1
     steps:
     - uses: actions/checkout@v2
+    - uses: vmactions/[email protected]
+      id: tunnel
+      with:
+        protocol: http
+        port: 8080
+    - name: Set envs
+      run: echo "TestingDomain=${{steps.tunnel.outputs.server}}" >> $GITHUB_ENV
     - name: Clone acmetest
       run: cd .. && git clone https://github.com/acmesh-official/acmetest.git  && cp -r acme.sh acmetest/
     - uses: vmactions/[email protected]
       with:
-        envs: 'NGROK_TOKEN TEST_LOCAL'
+        envs: 'NGROK_TOKEN TEST_LOCAL TestingDomain'
+        nat: |
+          "8080": "80"
         prepare: pkg install -y socat curl
         usesh: true
         run: |
@@ -127,13 +136,13 @@ jobs:
       TEST_LOCAL: 1
     steps:
     - uses: actions/checkout@v2
-    - uses: vmactions/ngrok[email protected]
-      id: ngrok
+    - uses: vmactions/cf[email protected]
+      id: tunnel
       with:
         protocol: http
         port: 8080
     - name: Set envs
-      run: echo "TestingDomain=${{steps.ngrok.outputs.server}}" >> $GITHUB_ENV
+      run: echo "TestingDomain=${{steps.tunnel.outputs.server}}" >> $GITHUB_ENV
     - name: Clone acmetest
       run: cd .. && git clone https://github.com/acmesh-official/acmetest.git  && cp -r acme.sh acmetest/
     - uses: vmactions/[email protected]