-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: some ci only after certain file directories are changed (#951)
* ci: some ci only after certain file directories are changed * 修改限制目录匹配规则 添加测试脚本action限制 * 测试action 过滤目录添加test目录
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,12 @@ name: PR Test | |
on: | ||
pull_request_target: | ||
branches: [main, dev] | ||
paths: # 这里是用来指定哪个文件更改,才会触发的 | ||
- "src/**" | ||
- "package.json" | ||
- "types/**" | ||
- "examples/**" | ||
- "test/**" | ||
|
||
jobs: | ||
build: | ||
|
@@ -16,7 +22,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: '${{ env.HEAD_SHA }}' | ||
ref: "${{ env.HEAD_SHA }}" | ||
|
||
- name: Get changed files and operations | ||
run: | | ||
|
@@ -39,7 +45,7 @@ jobs: | |
if: ${{ env.GIT_DIFF_FILES }} | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: '${{ env.BASE_SHA }}' | ||
ref: "${{ env.BASE_SHA }}" | ||
path: base-repo | ||
|
||
- name: Replace changed files | ||
|
@@ -54,7 +60,7 @@ jobs: | |
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
cache: 'yarn' | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
uses: borales/[email protected] | ||
|