visual-diff.yml 979 B

123456789101112131415161718192021222324252627
  1. name: visual diff
  2. on:
  3. # This allows PRs opened from forks to execute the Visual Snapshots
  4. # since secrets are not passed to workflows when triggered via forks
  5. # Using workflow_run is less preferred since it executes even when jobs
  6. # do not pass
  7. workflow_run:
  8. workflows:
  9. - acceptance
  10. types:
  11. - completed
  12. jobs:
  13. visual-diff:
  14. # Only execute this check when a PR is opened from a fork rather than the upstream repo & master pushes
  15. if: github.event.workflow_run.head_repository.full_name != 'getsentry/sentry' || github.event.workflow_run.head_branch == 'master'
  16. runs-on: ubuntu-20.04
  17. timeout-minutes: 20
  18. steps:
  19. - name: Diff snapshots
  20. id: visual-snapshots-diff
  21. uses: getsentry/action-visual-snapshot@v2
  22. with:
  23. api-token: ${{ secrets.VISUAL_SNAPSHOT_SECRET }}
  24. gcs-bucket: 'sentry-visual-snapshots'
  25. gcp-service-account-key: ${{ secrets.SNAPSHOT_GOOGLE_SERVICE_ACCOUNT_KEY }}