diff --git a/.github/workflows/edit-issue.yml b/.github/workflows/edit-issue.yml index 9f282e4..cb3e422 100644 --- a/.github/workflows/edit-issue.yml +++ b/.github/workflows/edit-issue.yml @@ -26,3 +26,26 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | python3 .github/scripts/write_report.py + + # steps if failure + - name: workflow url + if: failure() + id: workflow-url + run: | + echo "workflow_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT + + - name: comment on failure + if: failure() + uses: GrantBirki/comment@v2.0.8 + with: + issue-number: ${{ github.event.issue.number }} + file: .github/templates/parse-workflow-fail.md + vars: | + workflow_url: ${{ steps.workflow-url.outputs.workflow_url }} + + - name: add fail label + if: failure() + uses: actions-ecosystem/action-add-labels@v1.1.0 + with: + labels: workflow_error + \ No newline at end of file