ngbs 2 år sedan
förälder
incheckning
e2af11c9c4

+ 0 - 4
.github/workflows/build-adguardhome.yml

@@ -1,10 +1,6 @@
 name: Build AdGuardHome
 
 on:
-  # push:
-  #   branches: [ master ]
-  # pull_request:
-  #   branches: [ master ]
   # UTC +8 [https://crontab.guru/]
   schedule:
     - cron: "0 20 15,30 * *"

+ 2 - 5
.github/workflows/build-caddy.yml

@@ -1,11 +1,8 @@
 name: Build Caddy
 
 on:
-  # push:
-  #   branches: [ master ]
-  # pull_request:
-  #   branches: [ master ]
-
+  schedule:
+    - cron: "0 20 15,30 * *"
   workflow_dispatch:
 
 jobs:

+ 3 - 6
.github/workflows/build-lego.yml

@@ -1,11 +1,8 @@
 name: Build LEGO(go-acme)
 
 on:
-  # push:
-  #   branches: [ master ]
-  # pull_request:
-  #   branches: [ master ]
-
+  schedule:
+    - cron: "0 20 15,30 * *"
   workflow_dispatch:
 
 jobs:
@@ -44,4 +41,4 @@ jobs:
 
       - name: Image digest
         run: |
-          echo ${{ steps.docker_build_lego.outputs.digest }}
+          echo ${{ steps.docker_build_lego.outputs.digest }}

+ 2 - 0
.github/workflows/build-mdc.yml

@@ -1,6 +1,8 @@
 name: Build MDC
 
 on:
+  schedule:
+    - cron: "0 20 15,30 * *"
   workflow_dispatch:
     inputs:
       manual:

+ 4 - 4
.github/workflows/build-sing-box.yml

@@ -2,10 +2,10 @@ name: Build sing-box
 
 on:
   # push:
-    # branches: [ master ]
-    # paths:
-    #   - 'sing-box/**'
-    #   - '.github/workflows/build-sing-box.yml'
+  #   branches: [ master ]
+  #   paths:
+  #     - 'sing-box/**'
+  #     - '.github/workflows/build-sing-box.yml'
   # pull_request:
   #   branches: [ master ]
   # UTC +8

+ 0 - 4
.github/workflows/build-syncthing.yml

@@ -1,10 +1,6 @@
 name: Build Syncthing
 
 on:
-  # push:
-  #   branches: [ master ]
-  # pull_request:
-  #   branches: [ master ]
   # UTC +8 15 day
   schedule:
     - cron: "0 20 15,30 * *"

+ 4 - 4
.github/workflows/build-traefik.yml

@@ -2,10 +2,10 @@ name: Build Traefik
 
 on:
   # push:
-    # branches: [ master ]
-    # paths:
-    #   - 'traefik/**'
-    #   - '.github/workflows/build-traefik.yml'
+  #   branches: [ master ]
+  #   paths:
+  #     - 'traefik/**'
+  #     - '.github/workflows/build-traefik.yml'
   # pull_request:
   #   branches: [ master ]
   # UTC +8

+ 5 - 5
.github/workflows/build-v2ray.yml

@@ -2,15 +2,15 @@ name: Build V2ray
 
 on:
   # push:
-    # branches: [ master ]
-    # paths:
-    #   - 'v2ray/**'
-    #   - '.github/workflows/build-v2ray.yml'
+  #   branches: [ master ]
+  #   paths:
+  #     - 'v2ray/**'
+  #     - '.github/workflows/build-v2ray.yml'
   # pull_request:
   #   branches: [ master ]
   # UTC +8
   schedule:
-    - cron: "0 20 * * *"
+    - cron: "0 20 */7 * *"
   workflow_dispatch:
 
 jobs:

+ 5 - 5
.github/workflows/build-xray.yml

@@ -2,15 +2,15 @@ name: Build Xray
 
 on:
   # push:
-    # branches: [ master ]
-    # paths:
-    #   - 'xray/**'
-    #   - '.github/workflows/build-xray.yml'
+  #   branches: [ master ]
+  #   paths:
+  #     - 'xray/**'
+  #     - '.github/workflows/build-xray.yml'
   # pull_request:
   #   branches: [ master ]
   # UTC +8
   schedule:
-    - cron: "0 20 * * *"
+    - cron: "0 20 */7 * *"
   workflow_dispatch:
 
 jobs:

+ 4 - 4
.github/workflows/build-xrayr.yml

@@ -2,10 +2,10 @@ name: Build XrayR
 
 on:
   # push:
-    # branches: [ master ]
-    # paths:
-    #   - 'xrayr/**'
-    #   - '.github/workflows/build-xrayr.yml'
+  #   branches: [ master ]
+  #   paths:
+  #     - 'xrayr/**'
+  #     - '.github/workflows/build-xrayr.yml'
   # pull_request:
   #   branches: [ master ]
   # UTC +8 [https://crontab.guru/]

+ 0 - 75
.github/workflows/codeql-analysis.yml

@@ -1,75 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
-  push:
-    branches: [ master ]
-    paths-ignore:
-      # - '.github/**'
-      - '**/Dockerfile*'
-  pull_request:
-    # The branches below must be a subset of the branches above
-    branches: [ master ]
-  schedule:
-    - cron: '39 13 * * 1'
-
-jobs:
-  analyze:
-    name: Analyze
-    runs-on: ubuntu-latest
-    permissions:
-      actions: read
-      contents: read
-      security-events: write
-
-    strategy:
-      fail-fast: false
-      matrix:
-        language: [ 'ruby', 'javascript' ]
-        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
-        # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
-    steps:
-    - name: Checkout repository
-      uses: actions/checkout@v3
-
-    # Initializes the CodeQL tools for scanning.
-    - name: Initialize CodeQL
-      uses: github/codeql-action/init@v2
-      with:
-        languages: ${{ matrix.language }}
-        # If you wish to specify custom queries, you can do so here or in a config file.
-        # By default, queries listed here will override any specified in a config file.
-        # Prefix the list here with "+" to use these queries and those in the config file.
-        
-        # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
-        # queries: security-extended,security-and-quality
-
-        
-    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
-    # If this step fails, then you should remove it and run the build manually (see below)
-    - name: Autobuild
-      uses: github/codeql-action/autobuild@v2
-
-    # ℹ️ Command-line programs to run using the OS shell.
-    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
-    #   If the Autobuild fails above, remove it and uncomment the following three lines. 
-    #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
-    # - run: |
-    #   echo "Run, Build Application using script"
-    #   ./location_of_script_within_repo/buildscript.sh
-
-    - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v2

+ 0 - 27
.github/workflows/deploy.yml

@@ -1,27 +0,0 @@
-name: Deploy to VPS
-
-on:
-  # push:
-  #   branches: [ master ]
-  # pull_request:
-  #   branches: [ master ]
-
-  workflow_dispatch:
-
-jobs:
-  deploy:
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Deploy to VPS
-        uses: appleboy/ssh-action@master
-        with:
-          host: ${{ secrets.VPS_SSH_HOSTNAME }}
-          username: ${{ secrets.VPS_SSH_USERNAME }}
-          key: ${{ secrets.VPS_SSH_KEY }}
-          port: ${{ secrets.VPS_SSH_PORT }}
-          sync: true
-          script_stop: true
-          script: |
-            cd devops/docker
-            bash launcher.sh

+ 1 - 1
.github/workflows/main.yml

@@ -8,7 +8,7 @@ on:
     #   - '**/**'
     #   - '.github/workflows/main.yml'
     paths-ignore:
-      - '**/**'
+      - "**/**"
   # pull_request:
   #   branches: [ master ]
   # UTC +8 https://tool.lu/crontab/

+ 25 - 0
.github/workflows/renew-certificate.yml

@@ -0,0 +1,25 @@
+name: Renew Certificate
+
+on:
+  schedule:
+    - cron: "0 23 */1 */1 *" # every day 23:00
+    # - cron: "0 23 20 */2 *" # every 2 months 20 23:00
+  workflow_dispatch:
+
+jobs:
+  run-script:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Renew Certificate
+        uses: appleboy/ssh-action@master
+        with:
+          host: ${{ secrets.VPS_HKG_HOSTNAME }}
+          username: ${{ secrets.VPS_USERNAME }}
+          key: ${{ secrets.VPS_KEY }}
+          port: ${{ secrets.VPS_PORT }}
+          # fingerprint: ${{ secrets.VPS_FINGERPRINT }}
+          script_stop: true
+          script: |
+            cd /root/devops/docker/common/base/lego
+            bash docker_run.sh

+ 0 - 57
.github/workflows/run.yml

@@ -1,57 +0,0 @@
-name: Renew Certificate
-
-on:
-  # push:
-  #   branches: [ master ]
-  # pull_request:
-  #   branches: [ master ]
-
-  workflow_dispatch:
-  schedule:
-    - cron: "0 23 */1 */1 *" # every day 23:00
-    # - cron: "0 23 20 */2 *" # every 2 months 20 23:00
-
-jobs:
-
-  run-script:
-  
-    runs-on: ubuntu-latest
-    
-    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 timezone
-      #   uses: szenius/[email protected]
-      #   with:
-      #     timezoneLinux: "Asia/Shanghai"
-
-      - name: Renew Certificate
-        uses: appleboy/ssh-action@master
-        with:
-          host: ${{ secrets.VPS_HKG_HOSTNAME }}
-          username: ${{ secrets.VPS_USERNAME }}
-          key: ${{ secrets.VPS_KEY }}
-          port: ${{ secrets.VPS_PORT }}
-          # fingerprint: ${{ secrets.VPS_FINGERPRINT }}
-          script_stop: true
-          # TEST
-          # script: |
-          #   whoami
-          #   ls -al
-          script: |
-            cd /root/devops/docker/common/base/lego
-            bash docker_run.sh