Skip to content

Commit

Permalink
Merge pull request #10667 from ggbecker/fix-compare-ds-2
Browse files Browse the repository at this point in the history
Fix compare datastream check to correctly treat new line characters.
  • Loading branch information
Mab879 authored Jun 1, 2023
2 parents c7941c8 + 5cbbf3c commit 343bb89
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/compare-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,12 @@ jobs:
- name: Get diff.log
if: ${{ steps.compare_ds.outputs.COMPARE_DS_OUTPUT_SIZE != '0'}}
id: diff
run: | # set -f to disable any glob expansion that can be triggered in the echo command
set -f
run: |
body=$(cat diff.log)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "log=${body:0:65000}">> $GITHUB_OUTPUT
set +f
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "log<<$EOF" >> "$GITHUB_OUTPUT"
echo "${body:0:65000}" >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
Expand Down

0 comments on commit 343bb89

Please sign in to comment.