File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,31 @@ jobs:
32
32
const ref = '${{ inputs.ref }}';
33
33
const owner = context.repo.owner;
34
34
35
- const result = await github.rest.actions.createWorkflowDispatch({
35
+ await github.rest.actions.createWorkflowDispatch({
36
36
owner,
37
37
repo,
38
38
workflow_id,
39
39
ref,
40
40
});
41
41
42
- console.log(result)
42
+ - name : Get workflow run_id
43
+ uses : actions/github-script@v6
44
+ with :
45
+ script : |-
46
+ const owner = context.repo.owner;
47
+ const workflow_id = '${{ inputs.workflow }}';
48
+ const repo = '${{ inputs.repo }}';
49
+
50
+ const runs = await github.rest.actions.listWorkflowRuns({
51
+ owner,
52
+ repo,
53
+ workflow_id,
54
+ per_page: 1,
55
+ });
56
+
57
+ console.log(runs);
43
58
44
- const run_id = result.run_id ;
59
+ const run_id = runs[0].id ;
45
60
46
61
core.setOutput('run-id', run_id);
47
62
You can’t perform that action at this time.
0 commit comments