This GitHub Action reads text from path and stores outputs.text with the content.
Create a workflow .yml
file in your repositories .github/workflows
directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.
path
- A file to read fromtrim
- Remove whitespace from both ends of a string when true. Default is false.
text
- A string value to hold the content
name: Example
on: push
jobs:
echo:
runs-on: ubuntu-latest
steps:
- run: echo -n -e "HELLO\n !\n World!" > text.txt
- uses: pCYSl5EDgo/cat@master
id: hello
with:
path: text.txt
- run: echo $TEXT
env:
TEXT: ${{ steps.hello.outputs.text }}
The scripts and documentation in this project are released under the MIT License