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="."