From 813d0886b1aab727affed0089075380c48bdc783 Mon Sep 17 00:00:00 2001 From: monlor Date: Thu, 30 May 2024 21:37:19 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build.yml | 13 +++++++++++++ install.sh | 6 ++++++ jellyfin/entrypoint.sh | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 2bf4d29..58646ce 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -6,6 +6,9 @@ on: - main tags: - '*' + paths-ignore: + - 'README.md' + - 'install.sh' jobs: build-and-push: @@ -51,6 +54,8 @@ jobs: ghcr.io/${{ github.repository_owner }}/xiaoya-alist:latest ${{ env.IS_TAG == 'true' && 'ghcr.io/${{ github.repository_owner }}/xiaoya-alist:${{ env.VERSION }}' || '' }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - name: Build and push xiaoya-glue uses: docker/build-push-action@v4 @@ -61,6 +66,8 @@ jobs: ghcr.io/${{ github.repository_owner }}/xiaoya-glue:latest ${{ env.IS_TAG == 'true' && 'ghcr.io/${{ github.repository_owner }}/xiaoya-glue:${{ env.VERSION }}' || '' }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - name: Build and push xiaoya-emby uses: docker/build-push-action@v4 @@ -71,6 +78,8 @@ jobs: ghcr.io/${{ github.repository_owner }}/xiaoya-emby:latest ${{ env.IS_TAG == 'true' && 'ghcr.io/${{ github.repository_owner }}/xiaoya-emby:${{ env.VERSION }}' || '' }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - name: Build and push xiaoya-jellyfin uses: docker/build-push-action@v4 @@ -81,6 +90,8 @@ jobs: ghcr.io/${{ github.repository_owner }}/xiaoya-jellyfin:latest ${{ env.IS_TAG == 'true' && 'ghcr.io/${{ github.repository_owner }}/xiaoya-jellyfin:${{ env.VERSION }}' || '' }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - name: Build and push xiaoya-resilio uses: docker/build-push-action@v4 @@ -91,4 +102,6 @@ jobs: ghcr.io/${{ github.repository_owner }}/xiaoya-resilio:latest ${{ env.IS_TAG == 'true' && 'ghcr.io/${{ github.repository_owner }}/xiaoya-resilio:${{ env.VERSION }}' || '' }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/install.sh b/install.sh index 10f6439..0ec56d0 100644 --- a/install.sh +++ b/install.sh @@ -30,6 +30,12 @@ if ! command -v docker &> /dev/null; then fi fi +# 检查是否安装了compose插件,docker compose 命令 +if ! docker compose &> /dev/null; then + echo "系统未安装docker compose插件,退出程序..." + exit 1 +fi + # 检查服务是否已经运行 echo "检查服务是否已经运行..." service_exist=0 diff --git a/jellyfin/entrypoint.sh b/jellyfin/entrypoint.sh index 7f03cd9..8c18cd6 100644 --- a/jellyfin/entrypoint.sh +++ b/jellyfin/entrypoint.sh @@ -23,7 +23,7 @@ if echo "${ALIST_DOMAIN}" | grep -E -q '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0- echo "Alist IP address: $IP" else # 使用 nslookup 解析 Alist 域名 - IP=$(nslookup "${ALIST_DOMAIN:=alist}" | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -n 1) + IP=$(nslookup "${ALIST_DOMAIN}" | awk '/^Address: / { print $2 }' | tail -n 1) # 检查 IP 地址是否解析成功 if [ -z "$IP" ]; then