Explorar el Código

try breaking if bash command in github workflow fails

narodnik hace 5 años
padre
commit
6cb363abf7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      .github/workflows/matrix-commit-message.yml

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

@@ -12,7 +12,7 @@ jobs:
       - run: |
           ALL_MSGS=""
           for i in ${{ join(github.event.commits.*.id, ' ') }}; do
-            MSG=$(git --no-pager show -s --format='%h <b>%an</b>: %s' $i)
+            MSG=$(git --no-pager show -s --format='%h <b>%an</b>: %s' $i || break)
             ALL_MSGS="$ALL_MSGS$MSG"$'\n'
           done
           echo "::set-output name=COMMIT_MESSAGE::$ALL_MSGS"