Skip to content

Commit 926c675

Browse files
agockeCopilot
andauthored
Fix GitHub Actions output parsing in sync workflow (#78)
The sync script output may contain \r\n line endings, causing values like `classification=build-changes\r` to be written to `$GITHUB_OUTPUT`. GitHub Actions rejects this as `Invalid format 'build-changes'`. Fix: add `tr -d '\r'` when parsing Branch, Classification, and PR fields from script output. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 16bd188 commit 926c675

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/sync-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
echo "$output"
5757
5858
# Parse outputs from the script's summary
59-
sync_branch=$(echo "$output" | grep '^ *Branch:' | awk '{print $2}')
60-
classification=$(echo "$output" | grep '^ *Classification:' | awk '{print $2}')
61-
pr_url=$(echo "$output" | grep '^ *PR:' | awk '{print $2}')
59+
sync_branch=$(echo "$output" | grep '^ *Branch:' | awk '{print $2}' | tr -d '\r')
60+
classification=$(echo "$output" | grep '^ *Classification:' | awk '{print $2}' | tr -d '\r')
61+
pr_url=$(echo "$output" | grep '^ *PR:' | awk '{print $2}' | tr -d '\r')
6262
pr_number=$(echo "$pr_url" | grep -oP '/pull/\K[0-9]+' || true)
6363
6464
if [[ -n "$sync_branch" ]]; then

0 commit comments

Comments
 (0)