2626 INPUT_SLUG_MAXLENGTH : ${{ inputs.slug-maxlength }}
2727 INPUT_SHORT_LENGTH : ${{ inputs.short-length }}
2828
29+ # From Environment Variables
2930 - uses : rlespinasse/slugify-value@v1.4.0
3031 with :
3132 key : GITHUB_REPOSITORY
@@ -48,30 +49,25 @@ runs:
4849 prefix : ${{ inputs.prefix }}
4950 slug-maxlength : ${{ inputs.slug-maxlength }}
5051
51- # Specific values
52+ # From Specific values
5253 - uses : rlespinasse/slugify-value@v1.4.0
5354 with :
5455 key : GITHUB_EVENT_REF
5556 value : ${{ github.event.ref }}
5657 prefix : ${{ inputs.prefix }}
5758 slug-maxlength : ${{ inputs.slug-maxlength }}
58-
59- # Calculated values
60- - id : get-github-ref-name
61- run : |
62- refname="${{ github.head_ref || github.ref_name }}"
63- if [ -f "$GITHUB_OUTPUT" ]; then
64- echo "github-ref-name=${refname}" >> "$GITHUB_OUTPUT"
65- else
66- echo "::set-output name=github-ref-name::${refname}"
67- fi
68- shell : bash
6959 - uses : rlespinasse/slugify-value@v1.4.0
7060 with :
7161 key : GITHUB_REF_NAME
72- value : ${{ steps.get-github-ref-name.outputs.github-ref-name }}
62+ # Related to https://github.com/rlespinasse/github-slug-action/issues/104
63+ value : ${{ env.GITHUB_HEAD_REF_RAW || env.GITHUB_REF_NAME_RAW }}
7364 prefix : ${{ inputs.prefix }}
7465 slug-maxlength : ${{ inputs.slug-maxlength }}
66+ env :
67+ GITHUB_HEAD_REF_RAW : ${{ github.head_ref }}
68+ GITHUB_REF_NAME_RAW : ${{ github.ref_name }}
69+
70+ # From Calculated values
7571 - id : get-github-repository-owner-part
7672 run : |
7773 ownerpart=$(echo $GITHUB_REPOSITORY | cut -d/ -f1)
10399 prefix : ${{ inputs.prefix }}
104100 slug-maxlength : ${{ inputs.slug-maxlength }}
105101
106- # Short
102+ # From sha
107103 - uses : rlespinasse/shortify-git-revision@v1.6.0
108104 with :
109105 name : GITHUB_SHA
0 commit comments