Skip to content

Commit 4e776f3

Browse files
committed
fix(ci): stop storybook oversight workflows failing with "No jobs were run"
Both workflows only declared a pull_request trigger, but something forces them to also run on push (confirmed via the Actions API: every recent run has event=push and 0 jobs). Since push never matches a pull_request-only trigger, every commit produced a zero-job failing run and an email. Add a push trigger and move the packages/react(-native)/** path check from the trigger-level paths filter into an in-job dorny/paths-filter step, gating the build/lint steps on its output. This guarantees a job always registers while still skipping the expensive work when unrelated files change.
1 parent 2360a52 commit 4e776f3

2 files changed

Lines changed: 42 additions & 16 deletions

File tree

.github/workflows/react-native-storybook-oversight.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: React Native Storybook Oversight
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
6-
paths:
7-
- 'packages/react-native/**'
6+
push:
87

98
permissions:
109
contents: read
@@ -19,20 +18,34 @@ jobs:
1918
with:
2019
egress-policy: audit
2120

22-
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22+
23+
- name: Check for react-native changes
24+
id: filter
25+
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
26+
with:
27+
filters: |
28+
react-native:
29+
- 'packages/react-native/**'
30+
31+
- if: steps.filter.outputs.react-native == 'true'
32+
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
2333
with:
2434
version: 11.8.0
25-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
35+
- if: steps.filter.outputs.react-native == 'true'
36+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2737
with:
2838
node-version: '22.x'
2939
registry-url: 'https://registry.npmjs.org'
3040
cache: 'pnpm'
31-
- run: pnpm install --frozen-lockfile
41+
- if: steps.filter.outputs.react-native == 'true'
42+
run: pnpm install --frozen-lockfile
3243
env:
3344
NODE_AUTH_TOKEN: ${{ secrets.NPM_GLOBAL_READ_TOKEN }}
34-
- run: pnpm build:storybook:react-native
45+
- if: steps.filter.outputs.react-native == 'true'
46+
run: pnpm build:storybook:react-native
3547
env:
3648
NODE_OPTIONS: '--max_old_space_size=4096'
37-
- uses: rachelslurs/oversight-lint-action@v1
49+
- if: steps.filter.outputs.react-native == 'true'
50+
uses: rachelslurs/oversight-lint-action@v1
3851
working-directory: ./packages/react-native

.github/workflows/react-storybook-oversight.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: React Storybook Oversight
22
on:
33
pull_request:
44
types: [opened, synchronize, reopened]
5-
paths:
6-
- 'packages/react/**'
5+
push:
76

87
permissions:
98
contents: read
@@ -18,20 +17,34 @@ jobs:
1817
with:
1918
egress-policy: audit
2019

21-
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
21+
22+
- name: Check for react changes
23+
id: filter
24+
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
25+
with:
26+
filters: |
27+
react:
28+
- 'packages/react/**'
29+
30+
- if: steps.filter.outputs.react == 'true'
31+
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
2232
with:
2333
version: 11.8.0
24-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
34+
- if: steps.filter.outputs.react == 'true'
35+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2636
with:
2737
node-version: '22.x'
2838
registry-url: 'https://registry.npmjs.org'
2939
cache: 'pnpm'
30-
- run: pnpm install --frozen-lockfile
40+
- if: steps.filter.outputs.react == 'true'
41+
run: pnpm install --frozen-lockfile
3142
env:
3243
NODE_AUTH_TOKEN: ${{ secrets.NPM_GLOBAL_READ_TOKEN }}
33-
- run: pnpm build:storybook:react
44+
- if: steps.filter.outputs.react == 'true'
45+
run: pnpm build:storybook:react
3446
env:
3547
NODE_OPTIONS: '--max_old_space_size=4096'
36-
- uses: rachelslurs/oversight-lint-action@v1
48+
- if: steps.filter.outputs.react == 'true'
49+
uses: rachelslurs/oversight-lint-action@v1
3750
working-directory: ./packages/react

0 commit comments

Comments
 (0)