Skip to content
align-left

GitHub Action

Set text output

v1.1.0 Latest version

Set text output

align-left

Set text output

A composite actions to set the job output while maintaining the text format of multi-line strings

Installation

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

              

- name: Set text output

uses: mkungla/actions-set-text-output@v1.1.0

Learn more about this action in mkungla/actions-set-text-output

Choose a version

Set text output v1

A simple composite actions to set the job output while maintaining the text format e.g. markdown format and multi-line strings.

test

Usage

NOTE: mkungla/actions-set-text-output@v1 is branch which always has latest v1.x.x version.

- uses: mkungla/actions-set-text-output@v1
  id: content
  with:
    text: |
      # Set text output

      A simple composite actions to set the job output while maintaining the text format e.g. markdown format.

Example

  usage:
    runs-on: ubuntu-latest
    outputs:
      content: ${{ steps.content.outputs.value }}
    steps:
      - uses: mkungla/actions-set-text-output@v1
        id: content
        with:
          text: |
            # Set text output

            A simple composite actions to set the job output while maintaining the text format e.g. markdown format.
  result:
    runs-on: ubuntu-latest
    needs: usage
    steps:
      - if: ${{ !startsWith(needs.test-usage.outputs.content, '# Set text output') }}
        run: exit 1
      - run: echo "${{ needs.usage.outputs.content }}"