diff --git a/.github/workflows/dockerimage_gui.yml b/.github/workflows/dockerimage_gui.yml deleted file mode 100644 index 44226f8316..0000000000 --- a/.github/workflows/dockerimage_gui.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: v2raya_gui-docker - -on: - push: - tags: - - v* - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build production image - uses: docker/build-push-action@v2 - with: - context: . - builder: ${{ steps.buildx.outputs.name }} - file: Dockerfile.gui - platforms: linux/arm,linux/arm64,linux/amd64 - push: true - tags: mzz2017/v2raya-gui:latest - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/release_main.yml b/.github/workflows/release_main.yml index c9f6f47887..9923146904 100644 --- a/.github/workflows/release_main.yml +++ b/.github/workflows/release_main.yml @@ -714,7 +714,7 @@ jobs: v2raya-x86_64-linux.zip v2raya-x86_64-linux.zip.sha256.txt \ v2raya-x86_64-macos.zip v2raya-x86_64-macos.zip.sha256.txt \ v2raya-aarch64-macos.zip v2raya-aarch64-macos.zip.sha256.txt - Release_to_Docker: + Release_v2rayA_to_Docker: runs-on: ubuntu-22.04 needs: [GitHub_Release] if: startsWith(github.ref, 'refs/tags/v') @@ -733,7 +733,7 @@ jobs: IMAGE="mzz2017/v2raya" echo image=${IMAGE} >> $GITHUB_OUTPUT echo tag=${TAG} >> $GITHUB_OUTPUT - sed -i "s|Realv2rayAVersion$version|g" install/docker/docker_helper.sh + sed -i "s|Realv2rayAVersion|$version|g" install/docker/docker_helper.sh - name: Set up QEMU uses: docker/setup-qemu-action@v3.0.0 - name: Set up Docker Buildx @@ -756,4 +756,46 @@ jobs: ${{ steps.prep.outputs.image }}:latest cache-from: type=gha cache-to: type=gha,mode=max - + Release_v2rayA_GUI_to_Docker: + runs-on: ubuntu-22.04 + needs: [GitHub_Release] + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Check Version + id: prep + run: | + tag=$(git describe --tags $(git rev-list --tags --max-count=1)) + version=${tag:1} + echo "VERSION=$version" >> $GITHUB_OUTPUT + echo "VERSION=$version" >> $GITHUB_ENV + TAG=$(echo $GITHUB_REF | cut -d / -f 3) + IMAGE="mzz2017/v2raya-gui" + echo image=${IMAGE} >> $GITHUB_OUTPUT + - name: Download Web Files + uses: actions/download-artifact@v3 + with: + name: Web.zip + path: Web + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.0.0 + # - name: Login to DockerHub + # uses: docker/login-action@v3.0.0 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v5.0.0 + with: + context: . + builder: ${{ steps.buildx.outputs.name }} + file: install/docker/Dockerfile.GUI + platforms: linux/arm,linux/arm64,linux/amd64 + push: true + tags: mzz2017/v2raya-gui:latest + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/install/docker/Dockerfile.GUI.Action b/install/docker/Dockerfile.GUI.Action new file mode 100644 index 0000000000..94ef87808a --- /dev/null +++ b/install/docker/Dockerfile.GUI.Action @@ -0,0 +1,4 @@ +FROM nginx:stable-alpine +WORKDIR /build +COPY ./Web /usr/share/nginx/html +EXPOSE 80 \ No newline at end of file