Skip to content

Commit 6131e01

Browse files
authored
add service_name to be optional in push_swaggers (#1324)
1 parent adb618c commit 6131e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/_push_swagger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ ! -z "${{ inputs.version }}" ]; then
6767
echo "version=${{ inputs.version }}" >> $GITHUB_ENV
6868
else
69-
if [[ "${GITHUB_REF}" =~ refs/tags/${{ inputs.service_name }}/v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
69+
if [[ "${GITHUB_REF}" =~ refs/tags(/?${{ inputs.service_name }})?/v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
7070
version=$(echo "${GITHUB_REF}" | sed -E 's|.*/v||')
7171
echo "version=${version}" >> $GITHUB_ENV
7272

0 commit comments

Comments
 (0)