Post PR on workflow_run
diff --git a/.github/workflows/post_pr_comment.yml b/.github/workflows/post_pr_comment.yml
new file mode 100644
index 0000000..9224497
--- /dev/null
+++ b/.github/workflows/post_pr_comment.yml
@@ -0,0 +1,21 @@
+name: Use the data
+
+on:
+ workflow_run:
+ workflows: [Validate]
+ types:
+ - completed
+
+jobs:
+ post-comment:
+ runs-on: ubuntu-latest
+ steps:
+ - name: 'Post PR comment'
+ uses: mshick/add-pr-comment@v2
+ if: github.event_name == 'pull_request'
+ with:
+ message-id: ${{ github.sha }}
+ message: |
+ **Snapshot Tests**
+ **API 23**: [Report](https://happo.io/a/27/report/${{ github.sha }}-android23) [Diff](https://happo.io/a/27/p/27/compare/master-android23/${{ github.sha }}-android23)
+ **API 31**: [Report](https://happo.io/a/27/report/${{ github.sha }}-android31) [Diff](https://happo.io/a/27/p/27/compare/master-android31/${{ github.sha }}-android31)
\ No newline at end of file
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 3b32479..b70b721 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -86,14 +86,6 @@
model=Pixel2,version=23
model=Pixel2,version=31
outputs-dir: build/test-results
- - uses: mshick/add-pr-comment@v2
- if: github.event_name == 'pull_request'
- with:
- message-id: ${{ github.sha }}
- message: |
- **Snapshot Tests**
- **API 23**: [Report](https://happo.io/a/27/report/${{ github.sha }}-android23) [Diff](https://happo.io/a/27/p/27/compare/master-android23/${{ github.sha }}-android23)
- **API 31**: [Report](https://happo.io/a/27/report/${{ github.sha }}-android31) [Diff](https://happo.io/a/27/p/27/compare/master-android31/${{ github.sha }}-android31)
deploy:
if: github.event_name == 'push' && github.repository == 'airbnb/lottie-android' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest