File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -142,13 +142,13 @@ jobs:
142
142
cat tmp/scan_$1.json | jq -r '.Results[] | select(.Vulnerabilities != null) | .Type + " | " + (.Vulnerabilities[] | .VulnerabilityID + " | " + .PkgName + " | " + .InstalledVersion + " | " + .FixedVersion)' | sort >> tmp/md_summary_$1.md
143
143
fi
144
144
145
- # Use hack to set a multiline string output
146
- # ref: https://github.com/actions/toolkit/issues/403#issue-593398879
147
- TMP=$(cat tmp/md_summary_$1.md)
148
- TMP="${TMP//'%'/'%25'}"
149
- TMP="${TMP//$'\n'/'%0A'}"
150
- TMP="${TMP//$'\r'/'%0D'}"
151
- echo "md_summary_$1=$TMP " >> $GITHUB_OUTPUT
145
+ # Set a multiline string output with the following technique:
146
+ # ref: https://docs. github.com/en/ actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
147
+ #
148
+ eof_marker=EOF_$RANDOM
149
+ echo "md_summary_$1<<$eof_marker" >> $GITHUB_OUTPUT
150
+ cat tmp/md_summary_$1.md >> $GITHUB_OUTPUT
151
+ echo "$eof_marker " >> $GITHUB_OUTPUT
152
152
153
153
# Calculate a hash of the markdown summary
154
154
HASH=$(cat tmp/md_summary_$1.md | sha1sum)
You can’t perform that action at this time.
0 commit comments