Remove unnecessary join()s from GitHub Actions (#30040)

`contains()` works on arrays as well as strings, so the `join` is
unnecessary when trying to detect job statuses.
This commit is contained in:
Martin Robinson 2023-07-28 07:26:19 +02:00 committed by GitHub
parent 2ecdb8f45e
commit 9fa67685f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View file

@ -90,7 +90,7 @@ jobs:
if: ${{ always() && fromJson(needs.parse-comment.outputs.configuration).try}}
steps:
- name: Success
if: ${{ !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled') }}
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
uses: actions/github-script@v6
with:
script: |
@ -106,7 +106,7 @@ jobs:
body: "✨ Try run (" + formattedURL + ") " + "succeeded.",
});
- name: Failure
if: ${{ contains(join(needs.*.result, ','), 'failure') }}
if: ${{ contains(needs.*.result, 'failure') }}
uses: actions/github-script@v6
with:
script: |