feat: add get-repo-name

This commit is contained in:
2026-02-26 22:33:34 +01:00
parent 8a4003819d
commit 6f8792174c
4 changed files with 45 additions and 1 deletions

16
get-repo-name/action.yaml Normal file
View File

@@ -0,0 +1,16 @@
name: Get repo name
description: Outputs the repository name without the owner (e.g. "owner/repo" → "repo")
outputs:
name:
description: The repository name without the owner
value: ${{ steps.repo-name.outputs.name }}
runs:
using: "composite"
steps:
- id: repo-name
shell: bash
run: |
REPO="${GITEA_REPOSITORY:-$GITHUB_REPOSITORY}"
echo "name=${REPO##*/}" >> $GITHUB_OUTPUT