In GitHub Actions workflows like the ones shown in Panther's Github Actions onboarding documentation, a pipe character ( |
) is sometimes used, near the beginning of a run
or env
statement. What does the pipe do?
In YAML terms, the pipe indicates a block-style scalar format for the string that follows it. For our purposes, this means that including the pipe allows us to put multiple lines of code under one run
or env
header, and the lines will be treated as separate lines rather than combined into a single-line string.
For related info about the mechanics of YAML, see this YAML Multiline site.