This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decouple tbdocs report markdown comment (#87)
* decouple tbdocs report markdown comment * fix docs-report * add github job summary * Always push tbdocs artifacts * fix summary * fix docs * fix ci
- Loading branch information
Showing
8 changed files
with
96 additions
and
109 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: TBDocs Commenter | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['Continuous Integration'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
comment-action: | ||
name: TBDocs PR Comment | ||
runs-on: ubuntu-latest | ||
# runs only if it's triggered from a PR | ||
if: github.event.workflow_run.pull_requests[0].number != null | ||
|
||
steps: | ||
- name: Download TBDocs Report | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
run_id: ${{ github.event.workflow_run.id }} | ||
name: tbdocs-reporter-output | ||
path: ./.tbdocs | ||
|
||
- name: Report Aux Vars | ||
id: report | ||
run: | | ||
content=$(cat .tbdocs/docs-report.md) | ||
echo "::set-output name=content::$content" | ||
timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
echo "::set-output name=updated-at::$timestamp" | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v2 | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: TBDocs Report | ||
|
||
# Comment content of the report.md file on the PR | ||
- name: Comment on PR | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} | ||
# body with the content of the downloaded artifact report.md file | ||
body: | | ||
${{ steps.report.outputs.content }} | ||
--- | ||
TBDocs Report Updated at ${{ steps.report.outputs.timestamp }} - [${{ github.event.workflow_run.pull_requests[0].head_sha }}](https://github.com/${{ github.repository }}/commit/${{ github.event.workflow_run.pull_requests[0].head_sha }}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
This file was deleted.
Oops, something went wrong.
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
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