From 561d0cb006dd5d72a68e43161f3bbe6690f91687 Mon Sep 17 00:00:00 2001 From: Markson Hon Date: Sun, 12 Nov 2023 17:30:00 +0800 Subject: [PATCH] test: rewrite stable docker image build 10 --- .github/workflows/release_main.yml | 2 +- install/docker/Dockerfile.Action | 7 +------ install/docker/docker_helper.sh | 9 ++++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release_main.yml b/.github/workflows/release_main.yml index 79e91fede2..5e1c36b27a 100644 --- a/.github/workflows/release_main.yml +++ b/.github/workflows/release_main.yml @@ -733,7 +733,7 @@ jobs: IMAGE="mzz2017/v2raya" echo image=${IMAGE} >> $GITHUB_OUTPUT echo tag=${TAG} >> $GITHUB_OUTPUT - echo tag=${TAG} > ./version + sed -i "s|${TAG}|Realv2rayAVersion|g" install/docker/docker_helper.sh - name: Set up QEMU uses: docker/setup-qemu-action@v3.0.0 - name: Set up Docker Buildx diff --git a/install/docker/Dockerfile.Action b/install/docker/Dockerfile.Action index 7cc2cb49cc..e08a28fc41 100644 --- a/install/docker/Dockerfile.Action +++ b/install/docker/Dockerfile.Action @@ -1,11 +1,6 @@ -FROM mzz2017/git:alpine AS version -WORKDIR /build -ADD .git ./.git -RUN git describe --abbrev=0 --tags | tee ./version - FROM alpine:latest AS builder +WORKDIR /build COPY ./install/docker/docker_helper.sh ./docker_helper.sh -COPY ./version ./version RUN sh -c "$(cat ./docker_helper.sh)" RUN apk add --no-cache iptables ip6tables nftables RUN rm ./docker_helper.sh diff --git a/install/docker/docker_helper.sh b/install/docker/docker_helper.sh index ea7c8c0fa9..9fa3c1cef7 100644 --- a/install/docker/docker_helper.sh +++ b/install/docker/docker_helper.sh @@ -18,15 +18,14 @@ case "$(arch)" in *) ;; esac -v2raya_version=$(cat ./version) wget https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-$v2ray_arch.zip wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$v2ray_arch.zip -wget https://github.com/v2rayA/v2rayA/releases/download/v$v2raya_version/v2raya_linux_"$v2raya_arch"_"$v2raya_version" -unzip v2ray-linux-$v2ray_arch.zip -d v2ray +wget https://github.com/v2rayA/v2rayA/releases/download/vRealv2rayAVersion/v2raya_linux_"$v2raya_arch"_Realv2rayAVersion +unzip v2ray-linux-"$v2ray_arch".zip -d v2ray install ./v2ray/v2ray /usr/local/bin/v2ray -unzip Xray-linux-$v2ray_arch.zip -d xray +unzip Xray-linux-"$v2ray_arch".zip -d xray install ./xray/xray /usr/local/bin/xray -install ./v2raya_linux_"$v2raya_arch"_"$v2raya_version" /usr/bin/v2raya +install ./v2raya_linux_"$v2raya_arch"_Realv2rayAVersion /usr/bin/v2raya mkdir /usr/local/share/v2raya ln -s /usr/local/share/v2ray /usr/local/share/v2raya ln -s /usr/local/share/xray /usr/local/share/v2raya