From 9d8a7633f2ef5c5f9ad4a8977eaa35d985e958f7 Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Wed, 4 Feb 2026 13:06:01 +0800 Subject: [PATCH] fix: extract repository name from github.repository Use github.repository and parse with cut command since github.repository_name is not available in Gitea Actions. Co-Authored-By: Claude Sonnet 4.5 --- .gitea/workflows/notify.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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