mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-06-11 00:53:14 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b011e83cf8 | ||
|
|
00198f8992 |
26
action.yml
26
action.yml
@@ -26,30 +26,30 @@ runs:
|
|||||||
INPUT_SLUG_MAXLENGTH: ${{ inputs.slug-maxlength }}
|
INPUT_SLUG_MAXLENGTH: ${{ inputs.slug-maxlength }}
|
||||||
INPUT_SHORT_LENGTH: ${{ inputs.short-length }}
|
INPUT_SHORT_LENGTH: ${{ inputs.short-length }}
|
||||||
|
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_REPOSITORY
|
key: GITHUB_REPOSITORY
|
||||||
value: ${{ github.repository }}
|
value: ${{ github.repository }}
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_REF
|
key: GITHUB_REF
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_HEAD_REF
|
key: GITHUB_HEAD_REF
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_BASE_REF
|
key: GITHUB_BASE_REF
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
|
|
||||||
# Specific values
|
# Specific values
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_EVENT_REF
|
key: GITHUB_EVENT_REF
|
||||||
value: ${{ github.event.ref }}
|
value: ${{ github.event.ref }}
|
||||||
@@ -58,27 +58,27 @@ runs:
|
|||||||
|
|
||||||
# Calculated values
|
# Calculated values
|
||||||
- id: get-github-ref-name
|
- id: get-github-ref-name
|
||||||
run: echo "::set-output name=github-ref-name::${{ github.head_ref || github.ref_name }}"
|
run: echo "github-ref-name=${{ github.head_ref || github.ref_name }}" >> "$GITHUB_OUTPUT"
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_REF_NAME
|
key: GITHUB_REF_NAME
|
||||||
value: ${{ steps.get-github-ref-name.outputs.github-ref-name }}
|
value: ${{ steps.get-github-ref-name.outputs.github-ref-name }}
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
- id: get-github-repository-owner-part
|
- id: get-github-repository-owner-part
|
||||||
run: echo "::set-output name=github-repository-owner-part::$(echo $GITHUB_REPOSITORY | cut -d/ -f1)"
|
run: echo "github-repository-owner-part=$(echo $GITHUB_REPOSITORY | cut -d/ -f1)" >> "$GITHUB_OUTPUT"
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_REPOSITORY_OWNER_PART
|
key: GITHUB_REPOSITORY_OWNER_PART
|
||||||
value: ${{ steps.get-github-repository-owner-part.outputs.github-repository-owner-part }}
|
value: ${{ steps.get-github-repository-owner-part.outputs.github-repository-owner-part }}
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
- id: get-github-repository-name-part
|
- id: get-github-repository-name-part
|
||||||
run: echo "::set-output name=github-repository-name-part::$(echo $GITHUB_REPOSITORY | cut -d/ -f2)"
|
run: echo "github-repository-name-part=$(echo $GITHUB_REPOSITORY | cut -d/ -f2)" >> "$GITHUB_OUTPUT"
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: rlespinasse/slugify-value@v1.3.2
|
- uses: rlespinasse/slugify-value@v1.3.3
|
||||||
with:
|
with:
|
||||||
key: GITHUB_REPOSITORY_NAME_PART
|
key: GITHUB_REPOSITORY_NAME_PART
|
||||||
value: ${{ steps.get-github-repository-name-part.outputs.github-repository-name-part }}
|
value: ${{ steps.get-github-repository-name-part.outputs.github-repository-name-part }}
|
||||||
@@ -86,13 +86,13 @@ runs:
|
|||||||
slug-maxlength: ${{ inputs.slug-maxlength }}
|
slug-maxlength: ${{ inputs.slug-maxlength }}
|
||||||
|
|
||||||
# Short
|
# Short
|
||||||
- uses: rlespinasse/shortify-git-revision@v1.4.0
|
- uses: rlespinasse/shortify-git-revision@v1.5.1
|
||||||
with:
|
with:
|
||||||
name: GITHUB_SHA
|
name: GITHUB_SHA
|
||||||
short-on-error: true
|
short-on-error: true
|
||||||
length: ${{ steps.prefligth.outputs.PREFLIGHT_SHORT_LENGTH }}
|
length: ${{ steps.prefligth.outputs.PREFLIGHT_SHORT_LENGTH }}
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
- uses: rlespinasse/shortify-git-revision@v1.4.0
|
- uses: rlespinasse/shortify-git-revision@v1.5.1
|
||||||
with:
|
with:
|
||||||
name: GITHUB_EVENT_PULL_REQUEST_HEAD_SHA
|
name: GITHUB_EVENT_PULL_REQUEST_HEAD_SHA
|
||||||
revision: ${{ github.event.pull_request.head.sha }}
|
revision: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "::debug ::Set PREFLIGHT_SHORT_LENGTH=$PREFLIGHT_SHORT_LENGTH"
|
echo "::debug ::Set PREFLIGHT_SHORT_LENGTH=$PREFLIGHT_SHORT_LENGTH"
|
||||||
echo "::set-output name=PREFLIGHT_SHORT_LENGTH::$PREFLIGHT_SHORT_LENGTH"
|
echo "PREFLIGHT_SHORT_LENGTH=$PREFLIGHT_SHORT_LENGTH" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
Reference in New Issue
Block a user