diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 053c34d..5b40038 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -21,8 +21,20 @@ env: jobs: build: runs-on: self_website - + steps: + - name: Check Secret availability + run: | + echo "Checking if TOKEN secret exists..." + if [ -n "${{ secrets.TOKEN }}" ]; then + echo "TOKEN secret is available" + # 测试token有效性 + curl -f -H "Authorization: token ${{ secrets.TOKEN }}" \ + https://git.crash.work/api/v1/user/repos | head -5 + else + echo "TOKEN secret is NOT available" + fi + - name: Checkout repository uses: herryyun/checkout@v4 with: