Github Actions: another fix for the levitate workflow (#43742)

* fix: add col number to the link to work correctly

If we don't provide the position in a #step:{line}:{column} format
then the Github UI won't take us to the correct step.

* fix: escape the backtick ("`") characters properly
pull/43747/head
Levente Balogh 4 years ago committed by GitHub
parent 6bbf85e2e9
commit aeddfb0506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/detect-breaking-changes-build.yml
  2. 2
      scripts/check-breaking-changes.sh

@ -41,7 +41,7 @@ jobs:
- name: Persisting the check output - name: Persisting the check output
run: | run: |
mkdir -p ./levitate mkdir -p ./levitate
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}\" }" > ./levitate/result.json echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\" }" > ./levitate/result.json
- name: Upload check output as artifact - name: Upload check output as artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2

@ -39,7 +39,7 @@ while IFS= read -r line; do
if [ $STATUS -gt 0 ] if [ $STATUS -gt 0 ]
then then
EXIT_CODE=1 EXIT_CODE=1
GITHUB_MESSAGE="${GITHUB_MESSAGE}**\`${PACKAGE_NAME}\`** has possible breaking changes ([more info](${GITHUB_JOB_LINK}#step:${GITHUB_STEP_NUMBER}:1))<br />" GITHUB_MESSAGE="${GITHUB_MESSAGE}**\\\`${PACKAGE_NAME}\\\`** has possible breaking changes ([more info](${GITHUB_JOB_LINK}#step:${GITHUB_STEP_NUMBER}:1))<br />"
fi fi
done <<< "$PACKAGES" done <<< "$PACKAGES"

Loading…
Cancel
Save