Skip to content

Commit

Permalink
ci: Save in single string (and hope github comment can parse it out a…
Browse files Browse the repository at this point in the history
…gain
  • Loading branch information
EthanFreestone committed Sep 17, 2024
1 parent be3f8f2 commit 6424679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Setup validate_module_descriptor_errors file
if: failure()
## Make sure we convert to JSON-safe text before we try to send later
run: echo "$(cat validate_module_descriptor_output.txt)" | tee | grep "\[ERROR\]" | jq -R 2>&1 | tee validate_module_descriptor_errors.txt
run: echo "$(cat validate_module_descriptor_output.txt)" | grep "\[ERROR\]" | jq -Rs | tee validate_module_descriptor_errors.txt
- name: Comment failures on PR
if: failure()
run: |
Expand All @@ -69,4 +69,4 @@ jobs:
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
echo "SENDING TO: $COMMENT_URL"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL --data-binary "{ \"body\": \"$(cat validate_module_descriptor_errors.txt)\" }"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL --data "{ \"body\": \"$(cat validate_module_descriptor_errors.txt)\" }"

0 comments on commit 6424679

Please sign in to comment.