mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 19:53:50 +08:00
parent
63b65253bc
commit
46f4cba4a9
10
action.yml
10
action.yml
@ -54,6 +54,11 @@ runs:
|
|||||||
REF_BRANCH=${REF_BRANCH/refs\/heads\//}
|
REF_BRANCH=${REF_BRANCH/refs\/heads\//}
|
||||||
|
|
||||||
echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")"
|
echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")"
|
||||||
|
else
|
||||||
|
BASE_REF=$(printf "%q" "${{ github.event.base_ref }}")
|
||||||
|
BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/}
|
||||||
|
|
||||||
|
echo "::set-output name=base_ref_branch::$(eval printf "%s" "$BASE_REF")"
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: current_branch
|
- id: current_branch
|
||||||
@ -65,11 +70,6 @@ runs:
|
|||||||
else
|
else
|
||||||
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
|
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
REF=$(printf "%q" "${{ github.ref }}")
|
|
||||||
REF_BRANCH=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
|
|
||||||
|
|
||||||
echo "::set-output name=current_branch::$(eval printf "%s" "$REF_BRANCH")"
|
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: default
|
- id: default
|
||||||
|
Loading…
Reference in New Issue
Block a user