Skip to content
archive

GitHub Action

Cat for GitHub Actions

1.0.1 Latest version

Cat for GitHub Actions

archive

Cat for GitHub Actions

cat command like action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Cat for GitHub Actions

uses: pCYSl5EDgo/cat@1.0.1

Learn more about this action in pCYSl5EDgo/cat

Choose a version

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