Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore(ci): Fix new lines in github output (#4542)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikeee authored May 30, 2023
1 parent 422eb7f commit 4af8e57
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/bench_analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ jobs:
critcmp main pr >> output
echo "\`\`\`" >> output
cat output
comment="$(cat output)"
comment="${comment//'%'/'%25'}"
comment="${comment//$'\n'/'%0A'}"
comment="${comment//$'\r'/'%0D'}"
echo "comment=$comment" >> $GITHUB_OUTPUT
echo "comment<<EOF" >> $GITHUB_OUTPUT
cat output >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Write a new comment
uses: peter-evans/create-or-update-comment@v1.4.5
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/bench_formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ jobs:
critcmp main pr >> output
echo "\`\`\`" >> output
cat output
comment="$(cat output)"
comment="${comment//'%'/'%25'}"
comment="${comment//$'\n'/'%0A'}"
comment="${comment//$'\r'/'%0D'}"
echo "comment=$comment" >> $GITHUB_OUTPUT
echo "comment<<EOF" >> $GITHUB_OUTPUT
cat output >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Write a new comment
uses: peter-evans/create-or-update-comment@v1.4.5
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/bench_parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ jobs:
critcmp main pr >> output
echo "\`\`\`" >> output
cat output
comment="$(cat output)"
comment="${comment//'%'/'%25'}"
comment="${comment//$'\n'/'%0A'}"
comment="${comment//$'\r'/'%0D'}"
echo "comment=$comment" >> $GITHUB_OUTPUT
echo "comment<<EOF" >> $GITHUB_OUTPUT
cat output >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Write a new comment
uses: peter-evans/create-or-update-comment@v1.4.5
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/parser_conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ jobs:
echo "## Parser conformance results on ${{ matrix.os }}" > output
cargo coverage compare ./base_results.json ./new_results.json --markdown >> output
cat output
comment="$(cat output)"
comment="${comment//'%'/'%25'}"
comment="${comment//$'\n'/'%0A'}"
comment="${comment//$'\r'/'%0D'}"
echo "comment=$comment" >> $GITHUB_OUTPUT
echo "comment<<EOF" >> $GITHUB_OUTPUT
cat output >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Get the PR number
if: github.event_name == 'pull_request'
Expand Down

0 comments on commit 4af8e57

Please sign in to comment.