Skip to content

Commit 072b97c

Browse files
committed
fix: prevent commit messages with "quoted" content to break the sync CI
1 parent 2faeb05 commit 072b97c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/sync.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ jobs:
1515
- name: Check if sync is required
1616
id: check
1717
run: |
18-
COMMIT_MSG="${{ github.event.head_commit.message }}"
18+
{
19+
echo 'COMMIT_MSG<<__EOF__'
20+
echo '${{ github.event.head_commit.message }}'
21+
echo '__EOF__'
22+
} >> "$GITHUB_ENV"
23+
1924
if [[ "$COMMIT_MSG" == *"(sync):"* ]]; then
20-
echo "should_sync=true" >> $GITHUB_OUTPUT
25+
echo "should_sync=true" >> "$GITHUB_OUTPUT"
2126
echo "::notice::Commit message contains (sync): - triggering sync workflow"
2227
else
23-
echo "should_sync=false" >> $GITHUB_OUTPUT
28+
echo "should_sync=false" >> "$GITHUB_OUTPUT"
2429
echo "::notice::Commit message does not contain (sync): - skipping sync"
2530
fi
2631

0 commit comments

Comments
 (0)