Commit 9191fac 1 parent 94e376c commit 9191fac Copy full SHA for 9191fac
File tree 1 file changed +16
-23
lines changed
1 file changed +16
-23
lines changed Original file line number Diff line number Diff line change @@ -13,34 +13,27 @@ jobs:
13
13
- name : Setup Node.js, install deps
14
14
uses : ./.github/actions/setup
15
15
16
- - id : paths_src_
17
- name : ' Check paths: src/**'
18
- run : >-
19
- BASE=${GITHUB_BASE_REF:-HEAD~1}
20
-
21
- if [[ -n $(git diff --name-only refs/remotes/origin/$BASE --relative |
22
- grep '^src/.*$') ]]
23
-
24
- then
25
-
26
- echo "changed=true" >> $GITHUB_OUTPUT
27
-
28
- exit 0
29
-
30
- fi
31
-
32
- echo "changed=false" >> $GITHUB_OUTPUT
33
-
34
- exit 0
16
+ - name : Get All Changed Files
17
+ uses : Khan/actions@get-changed-files-v1
18
+ id : changed
19
+ with :
20
+ directories : src/
21
+
22
+ - id : changed-js
23
+ name : Find .js changed files
24
+ uses : Khan/actions@filter-files-v1
25
+ if : always()
26
+ with :
27
+ changed-files : ${{ steps.changed.outputs.files }}
28
+ extensions : ' .js'
35
29
36
30
- name : Run prettier
37
- run : >-
38
- node ./node_modules/actions-utils/list-changed-files.js | grep
39
- '.*\.js$' | xargs npm run -s format-files
31
+ if : steps.changed-js.outputs.filtered != ''
32
+ run : yarn run format-files ${{ steps.changed-js.outputs.filtered }}
40
33
41
34
- name : Rebuild our "dist" file
35
+ if : steps.changed.outputs.files != ''
42
36
run : yarn build
43
- if : steps.paths_src_.outputs.changed == 'true'
44
37
45
38
- uses : Khan/autofix-commit-action@main
46
39
env :
You can’t perform that action at this time.
0 commit comments