Kaynağa Gözat

github workflow action: fetch head message using git

narodnik 5 yıl önce
ebeveyn
işleme
c57eec7b79
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      .github/workflows/matrix-commit-message.yml

+ 3 - 1
.github/workflows/matrix-commit-message.yml

@@ -5,7 +5,9 @@ jobs:
     runs-on: ubuntu-latest
     name: Send message via Matrix
     steps:
-      - run: echo '::set-output name=COMMIT_MESSAGE::fuckyou'
+      - run: |
+          LAST_MSG=$(git --no-pager show -s --format='%h %an: %s' HEAD)
+          echo '::set-output name=COMMIT_MESSAGE::$LAST_MSG'
         id: commit-message
       - uses: narodnik/matrix-action@main
         with: