mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-05-17 10:25:08 +00:00
fix(GITHUB_REF_NAME): correctly fill the variable on pull request events
This commit is contained in:
committed by
Romain Lespinasse
parent
aa95092e35
commit
2c5a627861
19
.github/workflows/v4-tests-and-release.yml
vendored
19
.github/workflows/v4-tests-and-release.yml
vendored
@@ -11,14 +11,16 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Load using v3.x
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Load using v4.x with prefix
|
||||
uses: ./
|
||||
with:
|
||||
prefix: V4_
|
||||
short-length: 8
|
||||
|
||||
- name: Load using v3.x
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Validate // Partial variables
|
||||
run: |
|
||||
[[ "${{ env.GITHUB_REPOSITORY_OWNER_PART }}" == "${{ env.V4_GITHUB_REPOSITORY_OWNER_PART }}" ]]
|
||||
@@ -96,14 +98,16 @@ jobs:
|
||||
with:
|
||||
path: this-action
|
||||
ref: ${{ github.ref }}
|
||||
- name: Load using v3.x
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Load using v4.x with prefix
|
||||
uses: ./this-action
|
||||
with:
|
||||
prefix: V4_
|
||||
short-length: 8
|
||||
|
||||
- name: Load using v3.x
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Validate // Short SHA variables
|
||||
run: |
|
||||
[[ "${{ env.GITHUB_SHA_SHORT }}" == "${{ env.V4_GITHUB_SHA_SHORT }}" ]]
|
||||
@@ -120,6 +124,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Load using v4.x
|
||||
uses: ./
|
||||
|
||||
@@ -200,14 +205,16 @@ jobs:
|
||||
with:
|
||||
path: this-action
|
||||
ref: ${{ github.ref }}
|
||||
- name: Load using v3.x
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Load using v4.x with prefix
|
||||
uses: ./this-action
|
||||
with:
|
||||
prefix: V4_
|
||||
short-length: 8
|
||||
|
||||
- name: Load using v3.x
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Short SHA variables
|
||||
run: |
|
||||
echo "sha : ${{ env.GITHUB_SHA_SHORT }}"
|
||||
|
||||
@@ -58,7 +58,7 @@ runs:
|
||||
|
||||
# Calculated values
|
||||
- id: get-github-ref-name
|
||||
run: echo "::set-output name=github-ref-name::$(echo "${{ github.head_ref || github.ref }}" | cut -d/ -f3)"
|
||||
run: echo "::set-output name=github-ref-name::${{ github.head_ref || github.ref_name }}"
|
||||
shell: bash
|
||||
- uses: rlespinasse/slugify-value@v1.2.3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user