File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ inputs:
27
27
description : " Whether to push the new commit back to the repository. Must be true or false. Default: true"
28
28
required : false
29
29
default : true
30
- upload :
31
- description : " Whether to upload the new diagram as an artiface. Must be true or false . Default: false "
30
+ artifact_name :
31
+ description : " If given, the name of an artifact to be created containing the diagram . Default: don't create an artifact. "
32
32
required : false
33
- default : false
33
+ default : ' '
34
34
runs :
35
35
using : " node12"
36
36
main : " index.js"
Original file line number Diff line number Diff line change @@ -26312,11 +26312,11 @@ var main = async () => {
26312
26312
}
26313
26313
core.endGroup();
26314
26314
}
26315
- const shouldUpload = core.getBooleanInput("upload") ;
26315
+ const shouldUpload = core.getInput("artifact_name") !== "" ;
26316
26316
if (shouldUpload) {
26317
26317
core.startGroup("Upload diagram to artifacts");
26318
26318
const client = artifact.create();
26319
- const result = await client.uploadArtifact("Diagram" , [outputFile], ".");
26319
+ const result = await client.uploadArtifact(core.getInput("artifact_name") , [outputFile], ".");
26320
26320
if (result.failedItems.length > 0) {
26321
26321
throw "Artifact was not uploaded successfully.";
26322
26322
} else {
Original file line number Diff line number Diff line change @@ -85,11 +85,11 @@ const main = async () => {
85
85
core . endGroup ( )
86
86
}
87
87
88
- const shouldUpload = core . getBooleanInput ( 'upload' )
88
+ const shouldUpload = core . getInput ( 'artifact_name' ) !== ''
89
89
if ( shouldUpload ) {
90
90
core . startGroup ( 'Upload diagram to artifacts' )
91
91
const client = artifact . create ( )
92
- const result = await client . uploadArtifact ( 'Diagram' , [ outputFile ] , '.' )
92
+ const result = await client . uploadArtifact ( core . getInput ( 'artifact_name' ) , [ outputFile ] , '.' )
93
93
if ( result . failedItems . length > 0 ) {
94
94
throw 'Artifact was not uploaded successfully.'
95
95
} else {
You can’t perform that action at this time.
0 commit comments