diff --git a/README.md b/README.md index e65ac39..8c57743 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,18 @@ This action creates a new branch with the same commit reference as the branch it ## Outputs -### `created` +### `created` + +***WARNING. DEPRECATED. USE BRANCH_CREATED ENVIRONMENT VARIABLE*** Boolean value representing whether or not a new branch was created. +## Environment Variables Set + +### `BRANCH_CREATED` + +Boolean value representing whether or not a new branch was created. This environment variable can be used in susequent steps in your workflow. + ## Example usage ``` diff --git a/dist/index.js b/dist/index.js index 6264a10..0af2fce 100644 --- a/dist/index.js +++ b/dist/index.js @@ -370,6 +370,8 @@ function run() { core.debug(`Creating branch ${branch}`); const isCreated = yield (0, create_branch_1.createBranch)(github_1.getOctokit, github_1.context, branch, sha); core.setOutput('created', Boolean(isCreated)); + core.warning('Deprecation warning: If you are using the created output, this will be removed in future versions. Please use the BRANCH_CREATED environment variable instead.'); + core.exportVariable('BRANCH_CREATED', Boolean(isCreated)); } catch (error) { core.setFailed(error.message); diff --git a/src/main.ts b/src/main.ts index dfe4853..caf1171 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,6 +9,8 @@ async function run() { core.debug(`Creating branch ${branch}`); const isCreated = await createBranch(getOctokit, context, branch, sha); core.setOutput('created', Boolean(isCreated)); + core.warning('Deprecation warning: If you are using the created output, this will be removed in future versions. Please use the BRANCH_CREATED environment variable instead.'); + core.exportVariable('BRANCH_CREATED', Boolean(isCreated)); } catch (error: any) { core.setFailed(error.message); }