diff --git a/action.yml b/action.yml index f120f2e8..02a16ef2 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,8 @@ inputs: outputs: DEPLOYED: description: "Boolean value that identifies if the deployment was successful." + DESTRUCTIVE_CHANGES: + description: "Boolean value that identifies if destructive changes were made." runs: using: "node16" main: "index.js" diff --git a/index.js b/index.js index 5371ba24..b2fc0bb3 100644 --- a/index.js +++ b/index.js @@ -19,11 +19,15 @@ async function constructDestructiveChangesArgs(SfdxArguments) { "--postdestructivechanges", `${SfdxArguments.pathToDestructiveChanges}/destructiveChangesPost.xml` ); + core.setOutput("DESTRUCTIVE_CHANGES", true); } else if (file === "destructiveChangesPre.xml") { SfdxArguments.destructiveChanges.push( "--predestructivechanges", `${SfdxArguments.pathToDestructiveChanges}/destructiveChangesPre.xml` ); + core.setOutput("DESTRUCTIVE_CHANGES", true); + } else { + core.setOutput("DESTRUCTIVE_CHANGES", false); } } } @@ -37,7 +41,7 @@ function deploy(SfdxArguments) { "--manifestname", "temp-deploy-manifest", ], - "An error occured while trying to run force:source:manifest:create." + "An error occurred while trying to run force:source:manifest:create." ); GenerateManifestCommand.run(); if (!GenerateManifestCommand.succeeded) return; @@ -57,7 +61,7 @@ function deploy(SfdxArguments) { deployArgs.push("--wait", SfdxArguments.timeout); const DeployCommand = new SfdxCommand( deployArgs, - "An error occured while trying to run force:source:deploy." + "An error occurred while trying to run force:source:deploy." ); DeployCommand.run(); if (DeployCommand.succeeded === true) core.setOutput("DEPLOYED", true);