Skip to content

Commit

Permalink
deprecate set output
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjgrainger committed Nov 14, 2022
1 parent 4db6058 commit 64aa569
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 64aa569

Please sign in to comment.