From aa146254b2126445b8afff55788751f82730508c Mon Sep 17 00:00:00 2001 From: initialencounter <2911583893@qq.com> Date: Sat, 13 Apr 2024 11:34:49 +0800 Subject: [PATCH] feat: get artifacts --- .github/workflows/docker-publish.yml | 4 ++++ get_artifacts.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 8eaf326..07e8d1c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -47,6 +47,10 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Get artifacts + run: | + sh -c get_artifacts.sh ${{ secrets.GITHUB_TOKEN }} - name: Build and push by digest id: build diff --git a/get_artifacts.sh b/get_artifacts.sh index ce1ab1c..f748cd6 100644 --- a/get_artifacts.sh +++ b/get_artifacts.sh @@ -5,7 +5,7 @@ repository="NapNeko/NapCat.Build" run_id="8662095740" arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/) artifact_name="NapCat.linux.{$arch}" -token="" +token="$1" # 设置输出目录 output_dir="."