Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create comment that from a txt file? #237

Closed
seepine opened this issue Aug 4, 2023 · 1 comment
Closed

How to create comment that from a txt file? #237

seepine opened this issue Aug 4, 2023 · 1 comment

Comments

@seepine
Copy link

seepine commented Aug 4, 2023

like output.txt, it has multiple lines of text

actions ci auto build start...
install success
compile success
actions ci finish

I try, but failure

      - name: Generate QrCode
        id: log
        run: |
          echo "LOGS=$(cat output.txt)" >> $GITHUB_OUTPUT

      - name: Create or update comment
        uses: peter-evans/create-or-update-comment@v3
        with:
          issue-number: ${{ github.event.pull_request.number }}
          body: |
            Build success
            ${{ steps.log.outputs.LOGS }}
@seepine seepine changed the title How to commit that from a txt file? How to comment that from a txt file? Aug 4, 2023
@seepine seepine changed the title How to comment that from a txt file? How to create comment that from a txt file? Aug 4, 2023
@peter-evans
Copy link
Owner

Hi @seepine

You can use the body-path input to specify the path to a comment body.

      - name: Create or update comment
        uses: peter-evans/create-or-update-comment@v3
        with:
          issue-number: ${{ github.event.pull_request.number }}
          body-path: output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants