-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Naively add tardis bot comments to
build-docs.yml
- Loading branch information
1 parent
967e065
commit 12a3158
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' |