Files
actions-ansi-to-html/README.md
T
Justin McCormick 23f9be033a chore: testing
2022-08-16 02:37:12 -04:00

3.3 KiB

"ANSI to HTML" Action For GitHub Actions

A Github Action that converts ANSI color sequences to HTML friendly HEX codes.

Contributors Forks Stargazers Issues MIT License

**Table of Contents**

Usage

Read a file from disk that contains ANSI color escape sequences, escape its contents and post its contents to an active pull request.

jobs:
  build:
    permissions:
      contents: read
      pull-requests: write
    steps:
    - run: ./doSomething.sh | tee output.log
    - id: output-log
      uses: justinm/ansi-to-html-action@v0
      with:
        path: ./output.log
    - run: echo "${{ steps.output-log.outputs.contents }}"
    - if: ${{ github.event_name == 'pull_request' }}
      uses: thollander/actions-comment-pull-request@v1
      permissions:
        contents: read
        pull-requests: write
      with:
        message: |
          <details>
          <summary>output.log</summary>
          \`\`\`
          ${{ steps.output-log.outputs.content }}
          \`\`\`
          </details>
          *${{ steps.resolve-comment-id.outputs.comment-id }}*
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        comment_includes: ${{ steps.resolve-comment-id.outputs.comment-id }}

Contributors

Contributors

Sponsoring

Github Sponsors Patreon Contributors