Skip to content

Commit

Permalink
Merge pull request #27481 from storybookjs/valentin/improve-ci-triggers
Browse files Browse the repository at this point in the history
Build: Update trigger conditions for Circle CI workflows
  • Loading branch information
valentinpalkovic authored Jun 7, 2024
2 parents 3f3cb5d + df6d614 commit dfe9d46
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/trigger-circle-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Use pull_request_target, as we don't need to check out the actual code of the fork in this script.
# And this is the only way to trigger the Circle CI API on forks as well.
pull_request_target:
types: [opened, synchronize, labeled, unlabeled, reopened, converted_to_draft, ready_for_review]
types: [opened, synchronize, labeled, reopened]
push:
branches:
- next
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
trigger-normal-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:normal')
if: github.event_name == 'pull_request_target' && ((github.event.action == 'labeled' && github.event.label.name == 'ci:normal') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:normal')))
steps:
- name: Trigger Normal tests
run: >
Expand All @@ -58,7 +58,7 @@ jobs:
trigger-docs-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:docs')
if: github.event_name == 'pull_request_target' && ((github.event.action == 'labeled' && github.event.label.name == 'ci:docs') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:docs')))
steps:
- name: Trigger docs tests
run: >
Expand All @@ -77,7 +77,7 @@ jobs:
trigger-merged-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ci:merged')
if: github.event_name == 'push' || (github.event.action == 'labeled' && github.event.label.name == 'ci:merged') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:merged'))
steps:
- name: Trigger merged tests
run: >
Expand All @@ -96,7 +96,7 @@ jobs:
trigger-daily-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:daily')
if: github.event_name == 'pull_request_target' && ((github.event.action == 'labeled' && github.event.label.name == 'ci:daily') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'ci:daily')))
steps:
- name: Trigger the daily tests
run: >
Expand Down

0 comments on commit dfe9d46

Please sign in to comment.