Skip to content

Commit 64aa569

Browse files
deprecate set output
1 parent 4db6058 commit 64aa569

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@ This action creates a new branch with the same commit reference as the branch it
1414

1515
## Outputs
1616

17-
### `created`
17+
### `created`
18+
19+
***WARNING. DEPRECATED. USE BRANCH_CREATED ENVIRONMENT VARIABLE***
1820

1921
Boolean value representing whether or not a new branch was created.
2022

23+
## Environment Variables Set
24+
25+
### `BRANCH_CREATED`
26+
27+
Boolean value representing whether or not a new branch was created. This environment variable can be used in susequent steps in your workflow.
28+
2129
## Example usage
2230

2331
```

dist/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ function run() {
370370
core.debug(`Creating branch ${branch}`);
371371
const isCreated = yield (0, create_branch_1.createBranch)(github_1.getOctokit, github_1.context, branch, sha);
372372
core.setOutput('created', Boolean(isCreated));
373+
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.');
374+
core.exportVariable('BRANCH_CREATED', Boolean(isCreated));
373375
}
374376
catch (error) {
375377
core.setFailed(error.message);

src/main.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ async function run() {
99
core.debug(`Creating branch ${branch}`);
1010
const isCreated = await createBranch(getOctokit, context, branch, sha);
1111
core.setOutput('created', Boolean(isCreated));
12+
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.');
13+
core.exportVariable('BRANCH_CREATED', Boolean(isCreated));
1214
} catch (error: any) {
1315
core.setFailed(error.message);
1416
}

0 commit comments

Comments
 (0)