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

@ -103,8 +103,8 @@ jobs:
steps:
- name: Mark the job as successful
run: exit 0
if: ${{ !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled') }}
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
- name: Mark the job as unsuccessful
run: exit 1
if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')