fix: extract repository name from github.repository
All checks were successful
NTFY Notification / notify (push) Successful in 3s
All checks were successful
NTFY Notification / notify (push) Successful in 3s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Send to NTFY
|
- name: Send to NTFY
|
||||||
run: |
|
run: |
|
||||||
REPO="${{ github.repository_name }}"
|
FULL_REPO="${{ github.repository }}"
|
||||||
|
# 从 owner/repo 格式中提取仓库名称
|
||||||
|
REPO=$(echo "$FULL_REPO" | cut -d'/' -f2)
|
||||||
SHA="${{ github.sha }}"
|
SHA="${{ github.sha }}"
|
||||||
MSG="${{ github.event.head_commit.message }}"
|
MSG="${{ github.event.head_commit.message }}"
|
||||||
AUTHOR="${{ github.actor }}"
|
AUTHOR="${{ github.actor }}"
|
||||||
@@ -24,6 +26,6 @@ jobs:
|
|||||||
🌿 Branch: $BRANCH" \
|
🌿 Branch: $BRANCH" \
|
||||||
-H "Title: Git Push Notification" \
|
-H "Title: Git Push Notification" \
|
||||||
-H "Priority: default" \
|
-H "Priority: default" \
|
||||||
-H "Tags: gitea,push,${{ github.repository_name }}" \
|
-H "Tags: gitea,push,$REPO" \
|
||||||
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
||||||
https://ntfy.server10086.icu/gitea
|
https://ntfy.server10086.icu/gitea
|
||||||
|
|||||||
Reference in New Issue
Block a user