fix: id same

This commit is contained in:
shenjack 2022-12-29 14:21:01 +08:00
parent 1193dcbe4f
commit 6ab04e58e4

View File

@ -30,13 +30,13 @@ jobs:
# 获取短 sha
- name: Get short commit sha (bash)
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
id: get_short_sha
id: get_short_sha_bash
run: |
short_sha=$(echo ${GITHUB_SHA} | cut -c1-7)
echo "short_sha=$short_sha" >> $GITHUB_OUTPUT
- name: Get short commit sha (powershell)
if: runner.os == 'Windows'
id: get_short_sha
id: get_short_sha_powershell
run: |
$short_sha=${GITHUB_SHA}.substring(1,7)
Write-Output "short_sha=$short_sha" >> $GITHUB_OUTPUT