File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 4747 yarn ts-node-script scripts/ci/check_changeset.ts
4848 id : check-changeset
4949 - name : Print changeset checker output
50- run : echo "${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}"
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
5154 - name : Print blocking failure status
5255 run : echo "${{steps.check-changeset.outputs.BLOCKING_FAILURE}}"
5356 - name : Find Comment
Original file line number Diff line number Diff line change 1717
1818import { resolve } from 'path' ;
1919import { existsSync } from 'fs' ;
20+ import { writeFile } from 'fs/promises' ;
2021import { exec } from 'child-process-promise' ;
2122import chalk from 'chalk' ;
2223import simpleGit from 'simple-git' ;
@@ -28,6 +29,14 @@ const git = simpleGit(root);
2829const baseRef = process . env . GITHUB_PULL_REQUEST_BASE_SHA || 'master' ;
2930const headRef = process . env . GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD' ;
3031
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+
3140// Version bump text converted to rankable numbers.
3241const bumpRank : Record < string , number > = {
3342 'patch' : 0 ,
@@ -205,10 +214,13 @@ async function main() {
205214 * step. See:
206215 * https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
207216 */
208- if ( errors . length > 0 )
209- await exec (
210- `echo "CHANGESET_ERROR_MESSAGE=${ errors . join ( '%0A' ) } " >> $GITHUB_OUTPUT`
217+ if ( errors . length > 0 ) {
218+ await writeFile (
219+ githubOutputFile ,
220+ `CHANGESET_ERROR_MESSAGE=${ errors . join ( '%0A' ) } \n` ,
221+ { flag : 'a' }
211222 ) ;
223+ }
212224 process . exit ( ) ;
213225}
214226
You can’t perform that action at this time.
0 commit comments