Skip to content

Commit

Permalink
chore(CI): 尝试修复给变量赋值时执行文本的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MemoryShadow committed Mar 10, 2024
1 parent f093ba3 commit 298b56a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand All @@ -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; \
Expand Down

0 comments on commit 298b56a

Please sign in to comment.