ngbs 4 vuotta sitten
vanhempi
sitoutus
bd8f64fdef

+ 57 - 0
.github/workflows/build-encrypted-dns.yml

@@ -0,0 +1,57 @@
+name: Build ENCRYPTED DNS
+
+on:
+  # push:
+  #   branches: [ master ]
+  # pull_request:
+  #   branches: [ master ]
+
+  workflow_dispatch:
+
+jobs:
+  build-encrypted-dns:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check Out Repo
+        uses: actions/checkout@v2
+
+      - name: Set up Docker Buildx
+        id: buildx
+        uses: docker/setup-buildx-action@v1
+
+      - name: Cache Docker layers
+        uses: actions/cache@v2
+        with:
+          path: /tmp/.buildx-cache
+          key: ${{ runner.os }}-buildx-${{ github.sha }}
+          restore-keys: |
+            ${{ runner.os }}-buildx-
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKER_HUB_USERNAME }}
+          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
+
+      - name: Build encrypted-dns and push
+        id: docker_build_encrypted_dns
+        uses: docker/build-push-action@v2
+        with:
+          context: ./encrypted-dns
+          file: ./encrypted-dns/Dockerfile
+          push: true
+          tags: |
+            ${{ secrets.DOCKER_HUB_USERNAME }}/encrypted-dns:latest
+            ${{ secrets.DOCKER_HUB_USERNAME }}/encrypted-dns:0.9.1
+          builder: ${{ steps.buildx.outputs.name }}
+          cache-from: type=local,src=/tmp/.buildx-cache
+          cache-to: type=local,dest=/tmp/.buildx-cache-new
+
+      - name: Move cache
+        run: |
+          rm -rf /tmp/.buildx-cache
+          mv /tmp/.buildx-cache-new /tmp/.buildx-cache
+
+      - name: Image digest
+        run: |
+          echo ${{ steps.docker_build_encrypted_dns.outputs.digest }}

+ 73 - 0
.github/workflows/build-trojan-go.yml

@@ -0,0 +1,73 @@
+name: Build Trojan GO
+
+on:
+  # push:
+  #   branches: [ master ]
+  # pull_request:
+  #   branches: [ master ]
+
+  workflow_dispatch:
+
+jobs:
+  build-trojan-go:
+    needs: build-basic
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check Out Repo
+        uses: actions/checkout@v2
+
+      - name: Set up Docker Buildx
+        id: buildx
+        uses: docker/setup-buildx-action@v1
+
+      - name: Cache Docker layers
+        uses: actions/cache@v2
+        with:
+          path: /tmp/.buildx-cache
+          key: ${{ runner.os }}-buildx-${{ github.sha }}
+          restore-keys: |
+            ${{ runner.os }}-buildx-
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKER_HUB_USERNAME }}
+          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
+
+      - name: Build trojan-go-server and push
+        id: docker_build_trojan_go_server
+        uses: docker/build-push-action@v2
+        with:
+          context: ./trojan-go
+          file: ./trojan-go/Dockerfile.server
+          push: true
+          tags: |
+            ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:latest
+            ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:0.10.4-server
+          builder: ${{ steps.buildx.outputs.name }}
+          cache-from: type=local,src=/tmp/.buildx-cache
+          cache-to: type=local,dest=/tmp/.buildx-cache-new
+
+      - name: Build trojan-go-client and push
+        id: docker_build_trojan_go_client
+        uses: docker/build-push-action@v2
+        with:
+          context: ./trojan-go
+          file: ./trojan-go/Dockerfile.client
+          push: true
+          tags: |
+            ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:latest
+            ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:0.10.4-client
+          builder: ${{ steps.buildx.outputs.name }}
+          cache-from: type=local,src=/tmp/.buildx-cache
+          cache-to: type=local,dest=/tmp/.buildx-cache-new
+
+      - name: Move cache
+        run: |
+          rm -rf /tmp/.buildx-cache
+          mv /tmp/.buildx-cache-new /tmp/.buildx-cache
+
+      - name: Image digest
+        run: |
+          echo ${{ steps.docker_build_trojan_go_server.outputs.digest }}
+          echo ${{ steps.docker_build_trojan_go_client.outputs.digest }}

+ 1 - 7
.github/workflows/deploy.yml

@@ -1,19 +1,13 @@
-# This is a basic workflow to help you get started with Actions
-
 name: Deploy to VPS
 
-# Controls when the workflow will run
 on:
-  # Triggers the workflow on push or pull request events but only for the master branch
   # push:
   #   branches: [ master ]
   # pull_request:
   #   branches: [ master ]
 
-  # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
 
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
   deploy:
     runs-on: ubuntu-latest
@@ -30,4 +24,4 @@ jobs:
           script_stop: true
           script: |
             cd devops/docker
-            bash launcher.sh
+            bash launcher.sh

+ 0 - 111
.github/workflows/main.yml

@@ -948,117 +948,6 @@ jobs:
           echo ${{ steps.docker_build_kcptun_server.outputs.digest }}
           echo ${{ steps.docker_build_kcptun_client.outputs.digest }}
 
-  # build-trojan-go:
-  #   needs: build-basic
-  #   runs-on: ubuntu-latest
-  #   steps:
-  #     - name: Check Out Repo
-  #       uses: actions/checkout@v2
-
-  #     - name: Set up Docker Buildx
-  #       id: buildx
-  #       uses: docker/setup-buildx-action@v1
-
-  #     - name: Cache Docker layers
-  #       uses: actions/cache@v2
-  #       with:
-  #         path: /tmp/.buildx-cache
-  #         key: ${{ runner.os }}-buildx-${{ github.sha }}
-  #         restore-keys: |
-  #           ${{ runner.os }}-buildx-
-
-  #     - name: Login to Docker Hub
-  #       uses: docker/login-action@v1
-  #       with:
-  #         username: ${{ secrets.DOCKER_HUB_USERNAME }}
-  #         password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
-  #     - name: Build trojan-go-server and push
-  #       id: docker_build_trojan_go_server
-  #       uses: docker/build-push-action@v2
-  #       with:
-  #         context: ./trojan-go
-  #         file: ./trojan-go/Dockerfile.server
-  #         push: true
-  #         tags: |
-  #           ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:latest
-  #           ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:0.10.4-server
-  #         builder: ${{ steps.buildx.outputs.name }}
-  #         cache-from: type=local,src=/tmp/.buildx-cache
-  #         cache-to: type=local,dest=/tmp/.buildx-cache-new
-
-  #     - name: Build trojan-go-client and push
-  #       id: docker_build_trojan_go_client
-  #       uses: docker/build-push-action@v2
-  #       with:
-  #         context: ./trojan-go
-  #         file: ./trojan-go/Dockerfile.client
-  #         push: true
-  #         tags: |
-  #           ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:latest
-  #           ${{ secrets.DOCKER_HUB_USERNAME }}/trojan-go:0.10.4-client
-  #         builder: ${{ steps.buildx.outputs.name }}
-  #         cache-from: type=local,src=/tmp/.buildx-cache
-  #         cache-to: type=local,dest=/tmp/.buildx-cache-new
-
-  #     - name: Move cache
-  #       run: |
-  #         rm -rf /tmp/.buildx-cache
-  #         mv /tmp/.buildx-cache-new /tmp/.buildx-cache
-
-  #     - name: Image digest
-  #       run: |
-  #         echo ${{ steps.docker_build_trojan_go_server.outputs.digest }}
-  #         echo ${{ steps.docker_build_trojan_go_client.outputs.digest }}
-
-  # build-encrypted-dns:
-  #   needs: build-basic
-  #   runs-on: ubuntu-latest
-  #   steps:
-  #     - name: Check Out Repo
-  #       uses: actions/checkout@v2
-
-  #     - name: Set up Docker Buildx
-  #       id: buildx
-  #       uses: docker/setup-buildx-action@v1
-
-  #     - name: Cache Docker layers
-  #       uses: actions/cache@v2
-  #       with:
-  #         path: /tmp/.buildx-cache
-  #         key: ${{ runner.os }}-buildx-${{ github.sha }}
-  #         restore-keys: |
-  #           ${{ runner.os }}-buildx-
-
-  #     - name: Login to Docker Hub
-  #       uses: docker/login-action@v1
-  #       with:
-  #         username: ${{ secrets.DOCKER_HUB_USERNAME }}
-  #         password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
-  #     - name: Build encrypted-dns and push
-  #       id: docker_build_encrypted_dns
-  #       uses: docker/build-push-action@v2
-  #       with:
-  #         context: ./encrypted-dns
-  #         file: ./encrypted-dns/Dockerfile
-  #         push: true
-  #         tags: |
-  #           ${{ secrets.DOCKER_HUB_USERNAME }}/encrypted-dns:latest
-  #           ${{ secrets.DOCKER_HUB_USERNAME }}/encrypted-dns:0.9.1
-  #         builder: ${{ steps.buildx.outputs.name }}
-  #         cache-from: type=local,src=/tmp/.buildx-cache
-  #         cache-to: type=local,dest=/tmp/.buildx-cache-new
-
-  #     - name: Move cache
-  #       run: |
-  #         rm -rf /tmp/.buildx-cache
-  #         mv /tmp/.buildx-cache-new /tmp/.buildx-cache
-
-  #     - name: Image digest
-  #       run: |
-  #         echo ${{ steps.docker_build_encrypted_dns.outputs.digest }}
-
   # deploy:
   #   needs: [build-chinadns-ng, build-dnscrypt-proxy, build-doh-server, build-xray, build-v2ray, build-naiveproxy, build-syncthing, build-kms, build-lego, build-traefik, build-samba, build-caddy, build-udp2raw, build-tinyfec, build-frp, build-kcptun]
   #   runs-on: ubuntu-latest

+ 14 - 20
.github/workflows/run.yml

@@ -1,21 +1,15 @@
-# This is a basic workflow to help you get started with Actions
-
 name: Run every 60 days
 
-# Controls when the workflow will run
 on:
-  # Triggers the workflow on push or pull request events but only for the master branch
   # push:
   #   branches: [ master ]
   # pull_request:
   #   branches: [ master ]
 
-  # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
   schedule:
     - cron: "0 23 11 */2 *"
 
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
 
   build-basic:
@@ -24,20 +18,20 @@ jobs:
     
     steps:
     
-      - name: Set Variables
-        run: |
-          echo "DNSCRYPT_PROXY_VERSION=$(curl -fsSL https://api.github.com/repos/dnscrypt/dnscrypt-proxy/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
-          echo "CADDY_VERSION=$(curl -fsSL https://api.github.com/repos/caddyserver/caddy/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "V2RAY_VERSION=$(curl -fsSL https://api.github.com/repos/v2fly/v2ray-core/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "XRAY_VERSION=$(curl -fsSL https://api.github.com/repos/xtls/xray-core/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "NAIVE_VERSION=$(curl -fsSL https://api.github.com/repos/klzgrad/naiveproxy/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "FRP_VERSION=$(curl -fsSL https://api.github.com/repos/fatedier/frp/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "SYNCTHING_VERSION=$(curl -fsSL https://api.github.com/repos/syncthing/syncthing/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "KCPTUN_VERSION=$(curl -fsSL https://api.github.com/repos/xtaci/kcptun/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
-          echo "UDP2RAW_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/udp2raw-tunnel/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
-          echo "TINYVPN_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/tinyfecvpn/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
-          cat $GITHUB_ENV
-        shell: bash
+      # - name: Set Variables
+      #   run: |
+      #     echo "DNSCRYPT_PROXY_VERSION=$(curl -fsSL https://api.github.com/repos/dnscrypt/dnscrypt-proxy/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
+      #     echo "CADDY_VERSION=$(curl -fsSL https://api.github.com/repos/caddyserver/caddy/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "V2RAY_VERSION=$(curl -fsSL https://api.github.com/repos/v2fly/v2ray-core/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "XRAY_VERSION=$(curl -fsSL https://api.github.com/repos/xtls/xray-core/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "NAIVE_VERSION=$(curl -fsSL https://api.github.com/repos/klzgrad/naiveproxy/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "FRP_VERSION=$(curl -fsSL https://api.github.com/repos/fatedier/frp/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "SYNCTHING_VERSION=$(curl -fsSL https://api.github.com/repos/syncthing/syncthing/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "KCPTUN_VERSION=$(curl -fsSL https://api.github.com/repos/xtaci/kcptun/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
+      #     echo "UDP2RAW_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/udp2raw-tunnel/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
+      #     echo "TINYVPN_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/tinyfecvpn/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
+      #     cat $GITHUB_ENV
+      #   shell: bash
 
       - name: Run every 60 days
         uses: appleboy/ssh-action@master