Skip to content

Commit

Permalink
ci: refactor CI workflow conditions to run only when PR is approved (l…
Browse files Browse the repository at this point in the history
…angflow-ai#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

(cherry picked from commit 6ffe579)
  • Loading branch information
ogabrielluiz authored and nicoloboschi committed Jul 30, 2024
1 parent 6f9e1de commit aebe549
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit aebe549

Please sign in to comment.