Add tag input

This commit is contained in:
Victor Carlos Erenu
2026-04-15 02:50:58 +07:00
parent 8865a8ea08
commit dc7d56e7ff
2 changed files with 21 additions and 8 deletions
+10 -3
View File
@@ -14,6 +14,11 @@ on:
default: ''
required: false
type: string
tag:
description: 'Change branches references to tag-like references (e.g. v4.12.0-alpha7)'
default: false
required: false
type: boolean
issue-link:
description: 'Issue link in format https://github.com/wazuh/<REPO>/issues/<ISSUE-NUMBER>'
required: true
@@ -76,16 +81,18 @@ jobs:
env:
VERSION: ${{ inputs.version }}
STAGE: ${{ inputs.stage }}
TAG: ${{ inputs.tag }}
run: |
script_params=""
version=${{ env.VERSION }}
stage=${{ env.STAGE }}
tag=${{ env.TAG }}
# Both version and stage provided
if [[ -n "$version" && -n "$stage" ]]; then
if [[ -n "$version" && -n "$stage" && "$tag" != "true" ]]; then
script_params="--version ${version} --stage ${stage}"
elif [[ -z "$version" && -n "$stage" ]]; then
script_params="--stage ${stage}"
elif [[ -n "$version" && -n "$stage" && "$tag" == "true" ]]; then
script_params="--version ${version} --stage ${stage} --tag ${tag}"
fi
issue_number=$(echo "${{ inputs.issue-link }}" | awk -F'/' '{print $NF}')