diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 498a6009e60..ef1a1008c65 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -382,6 +382,23 @@ jobs: repository-list: ${{ needs.setup.outputs.repository-list }} shed-target: toolshed shed-key: ${{ secrets.TS_API_KEY }} + # report to the PR if deployment failed + - name: Get PR object + uses: 8BitJonny/gh-get-current-pr@2.2.0 + id: getpr + if: ${{ failure() }} + with: + sha: ${{ github.event.after }} + - name: Create comment + uses: peter-evans/create-or-update-comment@v2 + if: ${{ failure() }} + with: + token: ${{ secrets.PAT }} + issue-number: ${{ steps.getpr.outputs.number }} + body: | + Attention: deployment failed! + + https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} determine-success: name: Check workflow success