File tree 9 files changed +37
-70
lines changed 9 files changed +37
-70
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,14 @@ name: Test
11
11
on :
12
12
workflow_call :
13
13
inputs :
14
+ target_sync_repo :
15
+ description : " 目标(下游)仓库,格式为 owner/repository ,必须指定"
16
+ required : true
17
+ type : string
14
18
target_sync_branch :
15
- description : " 目标(下游)同步分支,默认为 github.ref ,根据实际情况修改"
19
+ description : " 目标(下游)同步分支,必须指定"
20
+ required : true
16
21
type : string
17
- default : ${{ github.ref }}
18
22
upstream_sync_repo :
19
23
description : " 上游仓库,默认为 github.repository ,根据实际情况修改"
20
24
type : string
39
43
- name : Checkout target repo
40
44
uses : actions/checkout@v4
41
45
with :
46
+ repository : ${{ inputs.target_sync_repo }}
42
47
fetch-depth : 0
43
48
token : ${{ secrets.TOEKN_FOREVER_FULL_WRITE }} # 使用具有完全写入权限的 TOKEN(必须包含 workflows )
44
49
# REQUIRED if your upstream repo is private (see wiki), 启用会造成 check-branch-exists 失败
Original file line number Diff line number Diff line change @@ -15,33 +15,39 @@ jobs:
15
15
secrets : inherit
16
16
with :
17
17
name : " test"
18
+ repo_name : " prototype-test/dist-repo-use-branch_test"
18
19
test2 :
19
20
uses : ./.github/workflows/validation-proxy.yml
20
21
needs : []
21
22
secrets : inherit
22
23
with :
23
24
name : " test2"
25
+ repo_name : " prototype-test/dist-repo-use-branch_test2"
24
26
test3 :
25
27
uses : ./.github/workflows/validation-proxy.yml
26
28
needs : []
27
29
secrets : inherit
28
30
with :
29
31
name : " test3"
32
+ repo_name : " prototype-test/dist-repo-use-branch_test3"
30
33
test4 :
31
34
uses : ./.github/workflows/validation-proxy.yml
32
35
needs : []
33
36
secrets : inherit
34
37
with :
35
38
name : " test4"
39
+ repo_name : " prototype-test/dist-repo-use-branch_test4"
36
40
test5 :
37
41
uses : ./.github/workflows/validation-proxy.yml
38
42
needs : []
39
43
secrets : inherit
40
44
with :
41
45
name : " test5"
46
+ repo_name : " prototype-test/dist-repo-use-branch_test5"
42
47
test6 :
43
48
uses : ./.github/workflows/validation-proxy.yml
44
49
needs : []
45
50
secrets : inherit
46
51
with :
47
- name : " test6"
52
+ name : " test6"
53
+ repo_name : " prototype-test/dist-repo-use-branch_test6"
Original file line number Diff line number Diff line change 1
1
name : test
2
2
3
3
on :
4
- workflow_call :
5
4
workflow_dispatch :
5
+ inputs :
6
+ name :
7
+ description : " 目标名,必须指定"
8
+ required : true
9
+ type : string
10
+ repo_name :
11
+ description : " 目标(下游)仓库,格式为 owner/repository ,必须指定"
12
+ required : true
13
+ type : string
6
14
7
15
jobs :
8
16
build :
9
17
uses : ./.github/workflows/validation-proxy.yml
10
18
secrets : inherit
11
19
with :
12
- name : " test"
20
+ name : ${{ inputs.name }}
21
+ repo_name : ${{ inputs.repo_name }}
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4
4
workflow_call :
5
5
inputs :
6
6
name :
7
+ description : " 目标名,必须指定"
8
+ required : true
9
+ type : string
10
+ repo_name :
11
+ description : " 目标(下游)仓库,格式为 owner/repository ,必须指定"
7
12
required : true
8
13
type : string
9
14
env :
@@ -31,14 +36,16 @@ jobs:
31
36
with :
32
37
repository : ${{ needs.setup.outputs.repository }}
33
38
main_branch : ${{ needs.setup.outputs.main_branch }}
34
- cd_path : " ${{ inputs.name }}/ci"
35
- cd_branch : " ${{ needs.setup.outputs.cd_branch_prefix }}${{ inputs.name }}"
36
- dist_path : " ${{ inputs.name }}/src"
37
- dist_branch : " ${{ needs.setup.outputs.dist_branch_prefix }}${{ inputs.name }}"
39
+ cd_path : ${{ inputs.name }}/ci
40
+ cd_branch : ${{ needs.setup.outputs.cd_branch_prefix }}${{ inputs.name }}
41
+ dist_path : ${{ inputs.name }}/src
42
+ dist_branch : ${{ needs.setup.outputs.dist_branch_prefix }}${{ inputs.name }}
38
43
sync :
39
44
uses : ./.github/workflows/sync.yml
40
45
secrets : inherit
41
46
needs : [setup, build]
42
47
with :
43
- upstream_sync_branch : " ${{ needs.setup.outputs.dist_branch_prefix }}${{ inputs.name }}"
48
+ target_sync_repo : ${{ inputs.repo_name }}
49
+ target_sync_branch : ${{ needs.setup.outputs.main_branch }}
50
+ upstream_sync_branch : ${{ needs.setup.outputs.dist_branch_prefix }}${{ inputs.name }}
44
51
upstream_sync_repo : ${{ needs.setup.outputs.repository }}
You can’t perform that action at this time.
0 commit comments