diff --git a/.gitea/workflows/notify.yml b/.gitea/workflows/notify.yml index f3ea267..b45bc20 100644 --- a/.gitea/workflows/notify.yml +++ b/.gitea/workflows/notify.yml @@ -7,7 +7,9 @@ jobs: steps: - name: Send to NTFY run: | - REPO="${{ github.repository_name }}" + FULL_REPO="${{ github.repository }}" + # 从 owner/repo 格式中提取仓库名称 + REPO=$(echo "$FULL_REPO" | cut -d'/' -f2) SHA="${{ github.sha }}" MSG="${{ github.event.head_commit.message }}" AUTHOR="${{ github.actor }}" @@ -24,6 +26,6 @@ jobs: 🌿 Branch: $BRANCH" \ -H "Title: Git Push Notification" \ -H "Priority: default" \ - -H "Tags: gitea,push,${{ github.repository_name }}" \ + -H "Tags: gitea,push,$REPO" \ -H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \ https://ntfy.server10086.icu/gitea