Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 845af54

Browse files
committed
chore(ci): skip other jobs if affected fails
1 parent c4e6039 commit 845af54

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/dev.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ permissions:
1919
pull-requests: write # for PR comments
2020

2121
jobs:
22-
report-electron-size:
23-
name: Report Electron size
22+
check-affected:
23+
name: Check affected jobs (NX)
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout the repository
@@ -38,6 +38,24 @@ jobs:
3838
- name: Check affected
3939
run: pnpm nx affected -t=rebuild-deps
4040

41+
report-electron-size:
42+
name: Report Electron size
43+
runs-on: ubuntu-latest
44+
needs:
45+
- check-affected
46+
steps:
47+
- name: Checkout the repository
48+
uses: actions/checkout@v4
49+
50+
- uses: pnpm/action-setup@v4
51+
- name: Set up node & dependencies
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: 22
55+
cache: 'pnpm'
56+
- name: Install dependencies
57+
run: pnpm install --frozen-lockfile
58+
4159
- name: Run the build
4260
uses: ./.github/actions/build-electron
4361
with:
@@ -58,6 +76,8 @@ jobs:
5876
report-server-size:
5977
name: Report server size
6078
runs-on: ubuntu-latest
79+
needs:
80+
- check-affected
6181
steps:
6282
- name: Checkout the repository
6383
uses: actions/checkout@v4
@@ -90,6 +110,8 @@ jobs:
90110
test_dev:
91111
name: Test development
92112
runs-on: ubuntu-latest
113+
needs:
114+
- check-affected
93115
steps:
94116
- name: Checkout the repository
95117
uses: actions/checkout@v4
@@ -110,6 +132,7 @@ jobs:
110132
runs-on: ubuntu-latest
111133
needs:
112134
- test_dev
135+
- check-affected
113136
steps:
114137
- uses: actions/checkout@v4
115138
- uses: pnpm/action-setup@v4
@@ -130,6 +153,7 @@ jobs:
130153
runs-on: ubuntu-latest
131154
needs:
132155
- build_docker
156+
- check-affected
133157
strategy:
134158
matrix:
135159
include:

0 commit comments

Comments
 (0)