瀏覽代碼

CI: Use fixed 9-character commit hash

PatTheMav 3 年之前
父節點
當前提交
6c9fe7f9b3
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      .github/workflows/main.yml

+ 4 - 4
.github/workflows/main.yml

@@ -94,7 +94,7 @@ jobs:
           }
 
           print "::set-output name=ccacheDate::$(date +"%Y-%m-%d")"
-          print "::set-output name=commitHash::$(git rev-parse --short HEAD)"
+          print "::set-output name=commitHash::${"$(git rev-parse HEAD)"[0,9]}"
 
       - name: Restore Compilation Cache
         id: ccache-cache
@@ -190,7 +190,7 @@ jobs:
         id: setup
         run: |
           echo "::set-output name=ccacheDate::$(date +"%Y-%m-%d")"
-          echo "::set-output name=commitHash::$(git rev-parse --short HEAD)"
+          echo "::set-output name=commitHash::$(git rev-parse HEAD | cut -c1-9)"
 
       - name: Restore Compilation Cache
         id: ccache-cache
@@ -265,8 +265,8 @@ jobs:
         working-directory: ${{ github.workspace }}/plugin
         id: setup
         run: |
-          $CommitHash = git rev-parse --short HEAD
-          Write-Output "::set-output name=commitHash::${CommitHash}"
+          $CommitHash = git rev-parse HEAD
+          Write-Output "::set-output name=commitHash::$($CommitHash.SubString(0,9))"
 
       - name: Check for GitHub Labels
         id: seekingTesters