-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
28 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 |
---|---|---|
|
@@ -54,7 +54,6 @@ jobs: | |
- name: Generate the image diff report | ||
env: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
id: image-diff | ||
run: | | ||
echo -e "## Summary of changed images\n" > report.md | ||
echo -e "This is an auto-generated report of images that have changed on the DVC remote\n" >> report.md | ||
|
@@ -101,30 +100,5 @@ jobs: | |
# Mention git commit SHA in the report | ||
echo -e "Report last updated at commit ${{ github.event.pull_request.head.sha }}" >> report.md | ||
# Save the report content to the output parameter 'report' | ||
echo 'report<<EOF' >> $GITHUB_OUTPUT | ||
cat report.md >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- name: Find comment with image diff report | ||
uses: peter-evans/[email protected] | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: 'This is an auto-generated report of images that have changed on the DVC remote' | ||
|
||
- name: Create comment with image diff report | ||
if: steps.fc.outputs.comment-id == '' | ||
uses: peter-evans/[email protected] | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: ${{ steps.image-diff.outputs.report }} | ||
|
||
- name: Update comment with new image diff report | ||
if: steps.fc.outputs.comment-id != '' | ||
uses: peter-evans/[email protected] | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
body: ${{ steps.image-diff.outputs.report }} | ||
edit-mode: replace | ||
# create/update PR comment | ||
cml comment update report.md |