Просмотр исходного кода

github workflow action: fetch head message using git

narodnik 5 лет назад
Родитель
Сommit
c57eec7b79
1 измененных файлов с 3 добавлено и 1 удалено
  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: