File tree Expand file tree Collapse file tree 2 files changed +55
-28
lines changed Expand file tree Collapse file tree 2 files changed +55
-28
lines changed Original file line number Diff line number Diff line change @@ -6016,22 +6016,36 @@ async function run() {
6016
6016
console . log ( token . length ) ;
6017
6017
6018
6018
const octokit = github . getOctokit ( token ) ;
6019
-
6020
- const dispatchResp = await octokit . rest . actions . createWorkflowDispatch ( {
6021
- owner : "sveltejs" ,
6022
- repo : "sites" ,
6023
- workflow_id : "docs-deploy-trigger.yml" ,
6024
- ref : "master" ,
6025
- inputs : {
6026
- repo,
6027
- branch,
6028
- docs_path,
6029
- pkg_path,
6030
- } ,
6031
- } ) ;
6019
+ const dispatchResp = await octokit . request (
6020
+ "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" ,
6021
+ {
6022
+ owner : "sveltejs" ,
6023
+ repo : "sites" ,
6024
+ workflow_id : "docs-deploy-trigger.yml" ,
6025
+ ref : "master" ,
6026
+ inputs : {
6027
+ repo,
6028
+ branch,
6029
+ docs_path,
6030
+ pkg_path,
6031
+ } ,
6032
+ }
6033
+ ) ;
6034
+ // const dispatchResp = await octokit.rest.actions.createWorkflowDispatch({
6035
+ // owner: "sveltejs",
6036
+ // repo: "sites",
6037
+ // workflow_id: "docs-deploy-trigger.yml",
6038
+ // ref: "master",
6039
+ // inputs: {
6040
+ // repo,
6041
+ // branch,
6042
+ // docs_path,
6043
+ // pkg_path,
6044
+ // },
6045
+ // });
6032
6046
core . info ( `API response status: ${ dispatchResp . status } 🚀` ) ;
6033
6047
} catch ( error ) {
6034
- throw error ;
6048
+ core . setFailed ( error . message ) ;
6035
6049
}
6036
6050
}
6037
6051
Original file line number Diff line number Diff line change @@ -12,22 +12,35 @@ async function run(): Promise<void> {
12
12
console . log ( token . length ) ;
13
13
14
14
const octokit = github . getOctokit ( token ) ;
15
-
16
- const dispatchResp = await octokit . rest . actions . createWorkflowDispatch ( {
17
- owner : "sveltejs" ,
18
- repo : "sites" ,
19
- workflow_id : "docs-deploy-trigger.yml" ,
20
- ref : "master" ,
21
- inputs : {
22
- repo,
23
- branch,
24
- docs_path,
25
- pkg_path,
26
- } ,
27
- } ) ;
15
+ const dispatchResp = await octokit . request (
16
+ "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" ,
17
+ {
18
+ owner : "sveltejs" ,
19
+ repo : "sites" ,
20
+ workflow_id : "docs-deploy-trigger.yml" ,
21
+ ref : "master" ,
22
+ inputs : {
23
+ repo,
24
+ branch,
25
+ docs_path,
26
+ pkg_path,
27
+ } ,
28
+ }
29
+ ) ;
30
+ // const dispatchResp = await octokit.rest.actions.createWorkflowDispatch({
31
+ // owner: "sveltejs",
32
+ // repo: "sites",
33
+ // workflow_id: "docs-deploy-trigger.yml",
34
+ // ref: "master",
35
+ // inputs: {
36
+ // repo,
37
+ // branch,
38
+ // docs_path,
39
+ // pkg_path,
40
+ // },
41
+ // });
28
42
core . info ( `API response status: ${ dispatchResp . status } 🚀` ) ;
29
43
} catch ( error ) {
30
- throw error ;
31
44
core . setFailed ( error . message ) ;
32
45
}
33
46
}
You can’t perform that action at this time.
0 commit comments