An action to add or update an existing comment anchored in a PR for test results, status messages, etc.
Find a file
GregoryDosh c1b02a8555 feat: more verbosity in plugin execution (#6)
fix breaking chars through env var sub instead of direct sub

log back in console the comment

fix: sanitize input through env var step

add env step

sanity check env

remove env dump

remove extra step

add debugging steps

Reviewed-on: #6
Co-authored-by: GregoryDosh <authentik@gregorydosh.com>
Co-committed-by: GregoryDosh <authentik@gregorydosh.com>
2024-05-01 04:32:09 +00:00
.renovaterc.json5 feat: more verbosity in plugin execution (#6) 2024-05-01 04:32:09 +00:00
action.yml feat: more verbosity in plugin execution (#6) 2024-05-01 04:32:09 +00:00
LICENSE.md feat: more verbosity in plugin execution (#6) 2024-05-01 04:32:09 +00:00
README.md feat: more verbosity in plugin execution (#6) 2024-05-01 04:32:09 +00:00

action-pr-comment

An action to add or update an existing comment anchored in a PR for test results, status messages, etc.

Example

name: Some Workflow

on:
  pull_request:

jobs:
  some-workflow:
    name: Send PR Comment
    if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
    runs-on: ubuntu-act-latest
    steps:

      - name: Validate
        id: validate
        shell: bash
        run: |
          some-validation-step arg1 arg2 ... 2>&1 | tee validate.json
          export SOME_ENV_VAR=$(cat validate.json | sed -z 's/\n/\\n/g')
          echo "SOME_ENV_VAR=\"$SOME_ENV_VAR\"" >> $GITHUB_OUTPUT

      - name: Post/Update PR Comment
        if: always()
        uses: https://git.auengun.net/homelab/action-pr-comment@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          comment: |
            #### Validation 🤖 \`${{ steps.validate.outcome }}\`
            <details open>
            <summary>Shell Output</summary>

            \`\`\`json\n
            ${{ fromJSON(steps.validate.outputs.SOME_ENV_VAR) }}
            \`\`\`

            </details>

            *Commit: ${{ github.sha }}*