Skip to content

Commit a3c2fc7

Browse files
committed
improve build skip when no source changes
1 parent a05ed7b commit a3c2fc7

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

.github/workflows/authzed-node.yaml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11
name: authzed-node-ci
22
on:
3+
push:
4+
branches:
5+
- "main"
36
pull_request:
47
branches:
58
- "*"
6-
paths:
7-
- src/**
8-
- package.json
9-
- .github/workflows/authzed-node.yaml
10-
push:
11-
branches:
12-
- main
13-
paths:
14-
- src/**
15-
- .github/workflows/authzed-node.yaml
16-
- package.json
17-
- js-dist/package.json
9+
merge_group:
10+
types:
11+
- "checks_requested"
1812
release:
1913
types: [published]
2014
jobs:
15+
paths-filter:
16+
runs-on: "buildjet-2vcpu-ubuntu-2204"
17+
outputs:
18+
codechange: "${{ steps.code-filter.outputs.codechange }}"
19+
steps:
20+
- uses: "actions/checkout@v4"
21+
- uses: "dorny/paths-filter@v3"
22+
id: "code-filter"
23+
with:
24+
filters: |
25+
codechange:
26+
- src/**
27+
- .github/workflows/authzed-node.yaml
28+
- package.json
29+
- js-dist/package.json
2130
test:
2231
name: Lint
2332
runs-on: "buildjet-2vcpu-ubuntu-2204"
2433
strategy:
2534
matrix:
2635
node-version: [18, 20, 21]
36+
needs: "paths-filter"
37+
if: |
38+
needs.paths-filter.outputs.codechange == 'true'
2739
steps:
2840
- uses: actions/checkout@v4
2941
- uses: "authzed/action-spicedb@v1"
@@ -63,6 +75,9 @@ jobs:
6375
strategy:
6476
matrix:
6577
node-version: [18, 20, 21]
78+
needs: "paths-filter"
79+
if: |
80+
needs.paths-filter.outputs.codechange == 'true'
6681
steps:
6782
- uses: actions/checkout@v4
6883
- uses: "authzed/action-spicedb@v1"

0 commit comments

Comments
 (0)