From 465e467212e993d3725990e46e9e3a543c767a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 15 Apr 2024 12:27:16 +0800 Subject: [PATCH] fix --- .github/workflows/docker-publish.yml | 2 ++ get_artifacts.sh | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2b9570d..68472f9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -49,6 +49,8 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Get artifacts + env: + ARCH_NC: ${{ matrix.platform }} run: | bash get_artifacts.sh ${{ secrets.GITHUB_TOKEN }} ls -lh diff --git a/get_artifacts.sh b/get_artifacts.sh index 4c00102..f624537 100644 --- a/get_artifacts.sh +++ b/get_artifacts.sh @@ -1,9 +1,8 @@ #!/bin/bash -arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/) -artifact_name="NapCat.linux.$arch" +[ "$ARCH_NC" = "linux/amd64" ] && ARCH_DOWN="x64" || [ "$ARCH_NC" = "linux/arm64" ] && ARCH_DOWN="arm64" token="$1" - +artifact_name="NapCat.linux.$ARCH_DOWN" # 设置输出目录 output_dir="."