Skip to content

Commit

Permalink
classic usage of actions comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitloup committed Sep 21, 2023
1 parent ac6877a commit f08759c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/commentPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Test Comment PR
on: pull_request

jobs:
example_comment_pr:
runs-on: ubuntu-latest
name: An example job to comment a PR
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Hello world ! :wave:
14 changes: 8 additions & 6 deletions .github/workflows/pod.yml → .github/workflows/pod.yml.back
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
strategy:
max-parallel: 4
matrix:
Expand Down Expand Up @@ -122,19 +123,20 @@ jobs:
with:
path: ./pa11y_output.txt

- name: Comment on pull request.
if: contains(steps.pa11y_output.outputs.content, 'Errors in http://')
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: '<details><summary>Pa11y testing results</summary>```${{ steps.pa11y_output.outputs.content }}```</details>'
# - name: Comment on pull request.
# if: contains(steps.pa11y_output.outputs.content, 'Errors in http://')
# uses: thollander/actions-comment-pull-request@v2
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# message: '<details><summary>Pa11y testing results</summary>```${{ steps.pa11y_output.outputs.content }}```</details>'

- name: Comment on pull request.
run: echo '${{ steps.pa11y_output.outputs.content }}'

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
Hello world ! :wave:

Expand Down

0 comments on commit f08759c

Please sign in to comment.