ci: refactor CI workflow conditions to run only when PR is approved (#2805)

* refactor: add check-reviews job to ci.yml

* refactor(ci.yml): update path-filter condition to depend on the output of check-reviews job for improved readability and maintainability

* chore(ci.yml): remove check-reviews job and update path-filter condition to check for 'lgtm' label before running the job
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-07-18 16:19:47 -03:00 committed by GitHub
commit 6ffe579c7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,8 +27,8 @@ concurrency:
jobs:
path-filter:
# should run if the PR is approved,or if it's a manual run or if it is not a draft PR
if: ${{ (github.event.review.state == 'APPROVED' && github.event.pull_request.draft == false) || github.event_name == 'workflow_dispatch' }}
if: ${{ (contains( github.event.pull_request.labels.*.name, 'lgtm') && github.event.pull_request.draft == false) || github.event_name == 'workflow_dispatch' }}
name: Filter Paths
runs-on: ubuntu-latest
outputs: