Skip to content

Commit

Permalink
Naively add tardis bot comments to build-docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Jul 13, 2023
1 parent 967e065 commit 12a3158
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,49 @@ jobs:
force_orphan: ${{ env.CLEAN_BRANCH }}
user_name: 'TARDIS Bot'
user_email: '[email protected]'

- name: Find comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: Hi, human.
if: always() && github.event_name == 'pull_request_target'

- name: Post comment (success)
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body: |
*\*beep\* \*bop\**
Hi, human.
The **`${{ github.workflow }}`** workflow has **succeeded** :heavy_check_mark:
[**Click here**](${{ env.URL }}) to see your results.
env:
URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pull/${{ github.event.number }}/index.html
if: success() && github.event_name == 'pull_request_target'

- name: Post comment (failure)
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body: |
*\*beep\* \*bop\**
Hi, human.
The **`${{ github.workflow }}`** workflow has **failed** :x:
[**Click here**](${{ env.URL }}) to see the build log.
env:
URL: https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }}?check_suite_focus=true
if: failure() && github.event_name == 'pull_request_target'

0 comments on commit 12a3158

Please sign in to comment.