File tree 3 files changed +7
-32
lines changed 3 files changed +7
-32
lines changed Original file line number Diff line number Diff line change 6
6
7
7
jobs :
8
8
test :
9
- uses : ./.github/workflows/validation .yml
9
+ uses : ./.github/workflows/test .yml
10
10
secrets : inherit
11
- with :
12
- cd_path : " test/ci"
13
- cd_branch : " main_-_cd_-_test"
14
- dist_path : " test/src"
15
- dist_branch : " main_-_dist_-_test"
16
11
test2 :
17
- uses : ./.github/workflows/validation.yml
18
- secrets : inherit
19
- with :
20
- cd_path : " test2/ci"
21
- cd_branch : " main_-_cd_-_test2"
22
- dist_path : " test2/src"
23
- dist_branch : " main_-_dist_-_test2"
12
+ uses : ./.github/workflows/test2.yml
13
+ secrets : inherit
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: test
2
2
3
3
# 这里通过主分支的 push 和手动触发器触发,也可以自定义其他触发方式
4
4
on :
5
+ workflow_call :
5
6
workflow_dispatch :
6
7
push :
7
8
branches :
Original file line number Diff line number Diff line change @@ -2,30 +2,14 @@ name: test2
2
2
3
3
# 这里通过主分支的 push 和手动触发器触发,也可以自定义其他触发方式
4
4
on :
5
+ workflow_call :
5
6
workflow_dispatch :
6
7
push :
7
8
branches :
8
9
- main
9
- env :
10
- cd_branch_prefix : ${{ github.ref }}_-_cd_-_
11
- dist_branch_prefix : ${{ github.ref }}_-_dist_-_
12
10
jobs :
13
- setup :
14
- runs-on : ubuntu-latest
15
- outputs :
16
- # ::set-output 命令将被弃用,而 env 又不能直接在下面非 steps 中使用,而 steps 又不支持 uses 使用 action yml 文件……因此这里转发使用 env
17
- cd_branch_prefix : ${{ env.cd_branch_prefix }}
18
- dist_branch_prefix : ${{ env.dist_branch_prefix }}
19
- steps :
20
- - id : nothing-step
21
- run : |
22
- echo "这一步是必要的,去掉会报错"
23
11
build :
24
- needs : setup
25
- uses : ./.github/workflows/validation.yml
12
+ uses : ./.github/workflows/validation-proxy.yml
26
13
secrets : inherit
27
14
with :
28
- cd_path : " test2/ci"
29
- cd_branch : " ${{ needs.setup.outputs.cd_branch_prefix }}test2"
30
- dist_path : " test2/src"
31
- dist_branch : " ${{ needs.setup.outputs.dist_branch_prefix }}test2"
15
+ name : " test2"
You can’t perform that action at this time.
0 commit comments