Added a top-level directory in the zip archive that is the commit
hash which makes it easier when downloading multiple artifacts
for comparison. Updated the filenames of screenshots for easier
comparison between different cases. Added that an error is
raised if no screenshots uploaded in workflow.
Running `oxipng` over a set of screenshots from a previous run that were
1.9M in size resulted in a total size of 1.3M, a 31.5% reduction.
This can be useful to reduce the artifact size stored in GitHub and
locally if downloading screenshots from multiple runs.
See https://til.simonwillison.net/github-actions/oxipng
The id was used when we attempted to update comments in an early
version of the feature. Also removed the job summary as it
doesn't have the value that it did in the original version of
the feature.
The original event trigger pull_request_target runs against the target branch (main), not the branch associated with the PR. Consequently, any new screenshots added in a PR are not captured, and the available screenshots reflect the state of the main branch code, not the code from the PR's branch.
This update addresses the issue by changing the event trigger to pull_request. However, it's important to note that this adjustment breaks the comments functionality since the action no longer has write permissions.