Skip to content

Commit c3f14a4

Browse files
author
Max Winterstein
committed
Use git log %s (subject) for commit_message env var
%B emits the full body. Multi-line commit messages corrupt $GITHUB_ENV (expects KEY=VALUE per line). Subject is sufficient for the downstream check against 'Apply automatic changes'.
1 parent 4e8fe7b commit c3f14a4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/update_shfmt_checksums.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222

2323
- name: Get last commit message
2424
id: get_commit_message
25-
run: echo "commit_message=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
25+
# %s = subject line only; %B (full body) breaks $GITHUB_ENV on multi-line messages.
26+
run: echo "commit_message=$(git log -1 --pretty=%s)" >> "$GITHUB_ENV"
2627

2728
- name: Set up Python
2829
uses: actions/setup-python@v6

0 commit comments

Comments
 (0)