File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 10
10
change :
11
11
description : " 提交内容"
12
12
type : string
13
+ pr :
14
+ description : " 需要合并提交"
15
+ type : boolean
16
+ default : true
17
+ market :
18
+ description : " 提交到市场"
19
+ type : boolean
20
+ default : true
13
21
14
22
jobs :
15
23
jobA :
@@ -27,10 +35,22 @@ jobs:
27
35
git add .
28
36
git commit -m ${{ github.event.inputs.change }}
29
37
git push
38
+ jobB :
39
+ name : createPr
40
+ runs-on : ubuntu-latest
41
+ env :
42
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
+ if : ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
45
+ steps :
46
+ - uses : actions/checkout@v2
47
+ - run : |
48
+ gh pr create -B main --title 'Merge release${{ github.event.inputs.tag }} into main' --body 'Created by Github action'
30
49
linux :
31
50
name : Linux
32
51
runs-on : ubuntu-latest
33
52
timeout-minutes : 30
53
+ if : ${{ github.event.inputs.market }}
34
54
steps :
35
55
- uses : actions/checkout@v2
36
56
Original file line number Diff line number Diff line change 9
9
change :
10
10
description : " 提交内容"
11
11
type : string
12
+ pr :
13
+ description : " 需要合并提交"
14
+ type : boolean
15
+ default : false
12
16
13
17
jobs :
14
18
jobA :
26
30
git add .
27
31
git commit -m ${{ github.event.inputs.change }}
28
32
git push
33
+ jobB :
34
+ name : createPr
35
+ runs-on : ubuntu-latest
36
+ env :
37
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
+ if : ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
40
+ steps :
41
+ - uses : actions/checkout@v2
42
+ - run : |
43
+ gh pr create -B main --title 'Merge release${{ github.event.inputs.tag }} into main' --body 'Created by Github action'
You can’t perform that action at this time.
0 commit comments