Open rkrisztian opened 1 year ago
What do you think about this?
echo "OUTDATED='$OUTDATED'" >> $GITHUB_OUTPUT
To give this.
OUTPUT='Package Current Wanted Latest Location Depended by
@types/mocha 10.0.1 10.0.3 10.0.3 node_modules/@types/mocha ...
...
'
Well, unfortunately the problem is that the syntax expected to be stored in GITHUB_OUTPUT
is not bash code. The apostrophes would be literal characters stored in the value of property OUTDATED
, breaking the condition ${{ steps.vars.outputs.OUTDATED != '' }}
as well.
See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
I see the following at https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/ci-cd/github-actions/persist.html :
I think this example is just wrong and misleading. The output of
npm outdated
may span across multiple lines, breaking the expected syntax ofGITHUB_OUTPUT
.AFAIK, the right solution is this: https://github.com/github/docs/pull/21599/files