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
This commit is contained in:
Levente Balogh
2022-01-06 12:02:45 +01:00
committed by GitHub
parent 6bbf85e2e9
commit aeddfb0506
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ jobs:
- name: Persisting the check output
run: |
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
uses: actions/upload-artifact@v2

View File

@@ -39,7 +39,7 @@ while IFS= read -r line; do
if [ $STATUS -gt 0 ]
then
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
done <<< "$PACKAGES"