Skip to content

Commit ddcf9f9

Browse files
Fix commit reading in GitHub Actions workflow
1 parent 2f75c9a commit ddcf9f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
id: commits
1313
run: |
1414
COMMIT_TEXT=""
15-
# Read each commit safely
16-
jq -c '.commits[]' < "${GITHUB_EVENT_PATH}" | while read commit; do
15+
while read commit; do
1716
MSG=$(echo "$commit" | jq -r '.message')
1817
URL=$(echo "$commit" | jq -r '.url')
1918
COMMIT_TEXT="${COMMIT_TEXT}- [$MSG]($URL)"
20-
done
19+
done < <(jq -c '.commits[]' < "${GITHUB_EVENT_PATH}")
20+
21+
# Write output for later steps
2122
echo "commit_text<<EOF" >> $GITHUB_OUTPUT
2223
echo "$COMMIT_TEXT" >> $GITHUB_OUTPUT
2324
echo "EOF" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)