Skip to content

Commit

Permalink
Report statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
alexv-smirnov authored May 21, 2024
1 parent 680ee23 commit b9e2d79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/actions/build_ya/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ runs:
run: |
set -x
if [ "${{ steps.build.outputs.status }}" == "failed" ]; then
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{github.repository}}/statuses/${{github.head_sha}} -d '{"state":"failure","description":"Build failed","context":"${{input.build_preset}}"}'
echo "Build failed. see the [build logs]($LOG_URL)." | .github/scripts/tests/comment-pr.py --fail
else
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{github.repository}}/statuses/${{github.head_sha}} -d '{"state":"success","description":"Build successful","context":"${{input.build_preset}}"}'
echo "Build successful." | .github/scripts/tests/comment-pr.py --ok
fi
Expand Down

0 comments on commit b9e2d79

Please sign in to comment.