sync
This commit is contained in:
19
.gitea/actions/extract-namespace-from-repo-name/action.yaml
Normal file
19
.gitea/actions/extract-namespace-from-repo-name/action.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
name: "Extract namespace from repo name"
|
||||
description: "Extracts the namespace name from the repo name, based on the convention of k_<namespace-name>"
|
||||
inputs:
|
||||
repo:
|
||||
description: 'The repo name, get it from "github.repository"'
|
||||
required: true
|
||||
outputs:
|
||||
namespace:
|
||||
description: "The namespace name"
|
||||
value: ${{ steps.extract.outputs.suffix }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: extract
|
||||
shell: bash
|
||||
run: |
|
||||
full_repo="${{ inputs.repo }}"
|
||||
suffix="${full_repo##*k_}"
|
||||
echo "suffix=$suffix" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user