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