File tree 2 files changed +4
-19
lines changed 2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change 47
47
yarn ts-node-script scripts/ci/check_changeset.ts
48
48
id : check-changeset
49
49
- name : Print changeset checker output
50
- run : |
51
- cat << 'eof_delimiter_that_will_never_occur_in_CHANGESET_ERROR_MESSAGE'
52
- ${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
53
- eof_delimiter_that_will_never_occur_in_CHANGESET_ERROR_MESSAGE
50
+ run : echo "${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}"
54
51
- name : Print blocking failure status
55
52
run : echo "${{steps.check-changeset.outputs.BLOCKING_FAILURE}}"
56
53
- name : Find Comment
Original file line number Diff line number Diff line change 17
17
18
18
import { resolve } from 'path' ;
19
19
import { existsSync } from 'fs' ;
20
- import { writeFile } from 'fs/promises' ;
21
20
import { exec } from 'child-process-promise' ;
22
21
import chalk from 'chalk' ;
23
22
import simpleGit from 'simple-git' ;
@@ -29,14 +28,6 @@ const git = simpleGit(root);
29
28
const baseRef = process . env . GITHUB_PULL_REQUEST_BASE_SHA || 'master' ;
30
29
const headRef = process . env . GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD' ;
31
30
32
- const githubOutputFile = ( function ( ) : string {
33
- const value = process . env . GITHUB_OUTPUT ;
34
- if ( ! value ) {
35
- throw new Error ( 'GITHUB_OUTPUT environment variable must be set' ) ;
36
- }
37
- return value ;
38
- } ) ( ) ;
39
-
40
31
// Version bump text converted to rankable numbers.
41
32
const bumpRank : Record < string , number > = {
42
33
'patch' : 0 ,
@@ -214,13 +205,10 @@ async function main() {
214
205
* step. See:
215
206
* https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
216
207
*/
217
- if ( errors . length > 0 ) {
218
- await writeFile (
219
- githubOutputFile ,
220
- `CHANGESET_ERROR_MESSAGE=${ errors . join ( '%0A' ) } \n` ,
221
- { flag : 'a' }
208
+ if ( errors . length > 0 )
209
+ await exec (
210
+ `echo "CHANGESET_ERROR_MESSAGE=${ errors . join ( '%0A' ) } " >> $GITHUB_OUTPUT`
222
211
) ;
223
- }
224
212
process . exit ( ) ;
225
213
}
226
214
You can’t perform that action at this time.
0 commit comments