ngbs 2 years ago
parent
commit
c696630d80
2 changed files with 0 additions and 164 deletions
  1. 0 82
      .github/workflows/build-v2ray.yml
  2. 0 82
      .github/workflows/build-xray.yml

+ 0 - 82
.github/workflows/build-v2ray.yml

@@ -1,82 +0,0 @@
-name: Build V2ray
-
-on:
-  # push:
-  #   branches: [ master ]
-  #   paths:
-  #     - 'v2ray/**'
-  #     - '.github/workflows/build-v2ray.yml'
-  # pull_request:
-  #   branches: [ master ]
-  # UTC +8
-  schedule:
-    - cron: "0 20 */7 * *"
-  workflow_dispatch:
-
-jobs:
-  build-v2ray:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Set Variables
-        run: |
-          echo "V2RAY_PRE_VERSION=$(curl -fsSL https://api.github.com/repos/v2fly/v2ray-core/tags | grep '"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
-        shell: bash
-
-      - name: Check Out Repo
-        uses: actions/checkout@v3
-
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v2
-        id: buildx
-
-      - name: Cache Docker layers
-        uses: actions/cache@v3
-        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@v2
-        with:
-          username: ${{ secrets.DOCKER_HUB_USERNAME }}
-          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
-      - name: Build and push Docker images
-        uses: docker/build-push-action@v3
-        id: docker_build_v2ray_core_pre
-        with:
-          context: ./v2ray
-          file: ./v2ray/Dockerfile
-          push: true
-          tags: |
-            ${{ secrets.DOCKER_HUB_USERNAME }}/v2ray:${{ env.V2RAY_PRE_VERSION }}
-          builder: ${{ steps.buildx.outputs.name }}
-          cache-from: type=local,src=/tmp/.buildx-cache
-          cache-to: type=local,dest=/tmp/.buildx-cache-new
-
-      - name: Build and push Docker images
-        uses: docker/build-push-action@v3
-        id: docker_build_v2ray_core
-        with:
-          context: ./v2ray
-          file: ./v2ray/Dockerfile.latest
-          push: true
-          tags: |
-            ${{ secrets.DOCKER_HUB_USERNAME }}/v2ray:latest
-            ${{ secrets.DOCKER_HUB_USERNAME }}/v2ray:${{ env.V2RAY_VERSION }}
-          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_v2ray_core_pre.outputs.digest }}
-          echo ${{ steps.docker_build_v2ray_core.outputs.digest }}

+ 0 - 82
.github/workflows/build-xray.yml

@@ -1,82 +0,0 @@
-name: Build Xray
-
-on:
-  # push:
-  #   branches: [ master ]
-  #   paths:
-  #     - 'xray/**'
-  #     - '.github/workflows/build-xray.yml'
-  # pull_request:
-  #   branches: [ master ]
-  # UTC +8
-  schedule:
-    - cron: "0 20 */7 * *"
-  workflow_dispatch:
-
-jobs:
-  build-xray:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Set Variables
-        run: |
-          echo "XRAY_PRE_VERSION=$(curl -fsSL https://api.github.com/repos/xtls/xray-core/tags | grep '"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
-        shell: bash
-
-      - name: Check Out Repo
-        uses: actions/checkout@v3
-
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v2
-        id: buildx
-
-      - name: Cache Docker layers
-        uses: actions/cache@v3
-        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@v2
-        with:
-          username: ${{ secrets.DOCKER_HUB_USERNAME }}
-          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
-      - name: Build and push Docker images
-        uses: docker/build-push-action@v3
-        id: docker_build_xray_core_pre
-        with:
-          context: ./xray
-          file: ./xray/Dockerfile
-          push: true
-          tags: |
-            ${{ secrets.DOCKER_HUB_USERNAME }}/xray:${{ env.XRAY_PRE_VERSION }}
-          builder: ${{ steps.buildx.outputs.name }}
-          cache-from: type=local,src=/tmp/.buildx-cache
-          cache-to: type=local,dest=/tmp/.buildx-cache-new
-
-      - name: Build and push Docker images
-        uses: docker/build-push-action@v3
-        id: docker_build_xray_core
-        with:
-          context: ./xray
-          file: ./xray/Dockerfile.latest
-          push: true
-          tags: |
-            ${{ secrets.DOCKER_HUB_USERNAME }}/xray:latest
-            ${{ secrets.DOCKER_HUB_USERNAME }}/xray:${{ env.XRAY_VERSION }}
-          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_xray_core_pre.outputs.digest }}
-          echo ${{ steps.docker_build_xray_core.outputs.digest }}