reusable-create-issue-for-failure.yml 749 B

1234567891011121314151617181920212223242526
  1. name: Reusable - Create issue for failure
  2. on:
  3. workflow_call:
  4. jobs:
  5. create-issue:
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v3
  9. - name: Create issue
  10. env:
  11. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  12. run: |
  13. cat > body.txt << EOF
  14. [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) failed.
  15. Please take a look and fix it ASAP.
  16. EOF
  17. gh issue create --title "$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER failed" \
  18. --label bug \
  19. --label area:build \
  20. --label priority:p1 \
  21. --body-file body.txt