From 298b56a0528680006c54b18a1de666c8fa00fac4 Mon Sep 17 00:00:00 2001 From: MemoryShadow Date: Sun, 10 Mar 2024 19:32:43 +0800 Subject: [PATCH] =?UTF-8?q?chore(CI):=20=E5=B0=9D=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=BB=99=E5=8F=98=E9=87=8F=E8=B5=8B=E5=80=BC=E6=97=B6?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=96=87=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3e5bc3..bbbf194 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,6 +155,9 @@ jobs: ls -lab packages echo $PWD pwd_path=$PWD + download_url=`curl -s https://api.github.com/repos/MemoryShadow/minecraftctl/releases/latest | grep browser_download_url | grep amd64.deb`; + download_url=${download_url#*: \"}; download_url=${download_url%\"*}; + echo download_url: ${download_url}; CheckID=`date +%s%N | md5sum | cut -c 1-10`; docker run -itd -v ${pwd_path}:${pwd_path} --name ubuntuInstance --env TZ=Asia/Shanghai --env DEBIAN_FRONTEND=noninteractive --net="host" docker.io/ubuntu:20.04 /bin/bash echo Apt update... @@ -168,12 +171,6 @@ jobs: echo minecraftctl uninstalling...; \ sudo apt remove --purge -y minecraftctl > /dev/null; \ echo minecraftctl Install the latest release...; \ - T_download_url=$(curl -s https://api.github.com/repos/MemoryShadow/minecraftctl/releases/latest | grep 'browser_download_url'); \ - echo T_download_url: ${T_download_url} - download_url=`curl -s https://api.github.com/repos/MemoryShadow/minecraftctl/releases/latest | grep 'browser_download_url' | grep amd64.deb`; \ - echo download_url: ${download_url}; \ - download_url=${download_url#*: \"}; download_url=${download_url%\"*}; \ - echo download_url: ${download_url}; \ wget ${download_url}; sudo apt install -y -q ./${download_url##*/}; rm ${download_url##*/}; \ CheckID=`date +%s%N | md5sum | cut -c 1-10`; \ echo -e "\n\nexport CheckID='${CheckID}'" | sudo tee -a /etc/minecraftctl/config; \