File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 7
7
tags :
8
8
- " v*"
9
9
10
+ # workflow_dispatch 是 GitHub 的手动触发 CI 机制,可以与 inputs 预定义的变量一起使用,对 push 触发的 CI 不生效。
10
11
workflow_dispatch :
11
12
inputs :
12
13
docker :
20
21
type : boolean
21
22
default : true
22
23
24
+ # 通过 push 触发的 CI 通过 env 调控。
25
+ env :
26
+ DEPLOY_DOCKER : false
27
+ DEPLOY_DENO : true
28
+
23
29
jobs :
24
30
unit-test :
25
31
runs-on : ubuntu-latest
@@ -100,7 +106,7 @@ jobs:
100
106
101
107
deploy-to-deno :
102
108
needs : [upload-art]
103
- if : ${{ inputs.deno || github.event_name == 'push' }}
109
+ if : ${{ inputs.deno || ( github.event_name == 'push' && DEPLOY_DENO) }}
104
110
runs-on : ubuntu-latest
105
111
permissions :
106
112
id-token : write
@@ -118,7 +124,7 @@ jobs:
118
124
119
125
release-docker :
120
126
needs : [test-docker]
121
- if : ${{ inputs.docker || github.event_name == 'push' }}
127
+ if : ${{ inputs.docker || ( github.event_name == 'push' && DEPLOY_DOCKER) }}
122
128
runs-on : ubuntu-latest
123
129
124
130
steps :
You can’t perform that action at this time.
0 commit comments