diff --git a/.github/workflows/_push_swagger.yml b/.github/workflows/_push_swagger.yml index 9d72ad713..a1183fd03 100644 --- a/.github/workflows/_push_swagger.yml +++ b/.github/workflows/_push_swagger.yml @@ -61,7 +61,7 @@ jobs: - name: Get the current tag, branch, or commit hash id: git_info run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ ! -z "${{ inputs.version }}" ]; then echo "version=${{ inputs.version }}" >> $GITHUB_ENV else if [[ "${GITHUB_REF}" =~ refs/tags/${{ inputs.service_name }}/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then