Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (29 loc) · 1.09 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.09 KB

cat

This GitHub Action reads text from path and stores outputs.text with the content.

Usage

Pre-requisites

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.

Inputs

  • path - A file to read from
  • trim - Remove whitespace from both ends of a string when true. Default is false.

Outputs

  • text - A string value to hold the content

Example workflow

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 }}

License

The scripts and documentation in this project are released under the MIT License