More tweaks for the try GitHub Action (#30029)

- Don't trigger try jobs when comments are deleted or edited.
- Don't report success for cancelled jobs.
This commit is contained in:
Martin Robinson 2023-07-27 10:06:36 +02:00 committed by GitHub
parent e38d21d33d
commit 4d627318af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,9 @@
on: issue_comment
name: Try
on:
issue_comment:
types: [created]
jobs:
parse-comment:
name: Process Comment
@ -87,7 +90,7 @@ jobs:
if: ${{ always() && fromJson(needs.parse-comment.outputs.configuration).try}}
steps:
- name: Success
if: ${{ !contains(join(needs.*.result, ','), 'failure') }}
if: ${{ !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled') }}
uses: actions/github-script@v6
with:
script: |