Browse Source

Revert "fix(ci): Do not skip step for visual diffs on PRs or master (#33929)" (#33964)

This reverts commit cdcbf1617a327197fd545045d405a27dda4c3e29.
Armen Zambrano G 2 years ago
parent
commit
90473469f5
2 changed files with 4 additions and 4 deletions
  1. 2 2
      .github/workflows/acceptance.yml
  2. 2 2
      .github/workflows/visual-diff.yml

+ 2 - 2
.github/workflows/acceptance.yml

@@ -324,8 +324,8 @@ jobs:
       - name: Diff snapshots
         id: visual-snapshots-diff
         uses: getsentry/action-visual-snapshot@v2
-        # Do not execute on forks. Forks are handled in visual-diff.yml
-        if: github.event.pull_request.head.repo.full_name == 'getsentry/sentry' || github.ref == 'refs/heads/master'
+        # Do not execute on forks or on master. Forks are handled in visual-diff.yml
+        if: github.head_repository.full_name == 'getsentry/sentry' && github.ref != 'refs/heads/master'
         with:
           api-token: ${{ secrets.VISUAL_SNAPSHOT_SECRET }}
           gcs-bucket: 'sentry-visual-snapshots'

+ 2 - 2
.github/workflows/visual-diff.yml

@@ -12,8 +12,8 @@ on:
 
 jobs:
   visual-diff:
-    # Only execute this check when a PR is opened from a fork rather than the upstream repo
-    if: github.event.workflow_run.head_repository.full_name != 'getsentry/sentry'
+    # This is the opposite condition as acceptance.yml/visual-diff
+    if: github.head_repository.full_name != 'getsentry/sentry'
     runs-on: ubuntu-20.04
     timeout-minutes: 20