Skip to content

Commit

Permalink
Make CI create comment with link to HTML artifacts (ros2#4564)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard authored Jul 18, 2024
1 parent 853f7b5 commit b88e8ef
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,30 @@ jobs:
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: html-artifacts
name: html-artifacts-${{ github.event.pull_request.number }}
path: build/html
retention-days: 30 # default 90
compression-level: 9 # maximum compression, default 6
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- name: Find HTML artifacts link comment
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "HTML artifacts:"

- name: Create or update HTML artifacts link comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
HTML artifacts: ${{ steps.artifact-upload-step.outputs.artifact-url }}.
To view the resulting site:
1. Click on the above link to download the artifacts archive
2. Extract it
3. Open `html-artifacts-${{ github.event.pull_request.number }}/index.html` in your favorite browser
edit-mode: replace

0 comments on commit b88e8ef

Please sign in to comment.