From 4fa9cd96190c1a45744d48299704dfda34b71764 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 6 Nov 2021 18:07:37 -0700 Subject: [PATCH] Ensure analyze step is only ran during pull requests --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c79d82de..a7b24257 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,27 +52,27 @@ jobs: xcodebuild test-without-building -project Sparkle.xcodeproj -scheme UITests -configuration Debug -derivedDataPath build - name: Analyze Sparkle - if: ${{ matrix.run-analyzer }} + if: ${{ matrix.run-analyzer && github.event_name == 'pull_request' }} env: DEVELOPER_DIR: ${{ matrix.xcode-path }} run: | xcodebuild analyze -project Sparkle.xcodeproj -quiet -scheme Sparkle -configuration Release -derivedDataPath analyze > anaylze_output.txt - name: Find Analyzed Warnings - if: ${{ success() && matrix.run-analyzer }} + if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' }} env: DEVELOPER_DIR: ${{ matrix.xcode-path }} run: | grep -q "warning:" anaylze_output.txt - name: Extract Analyzed Warnings - if: ${{ success() && matrix.run-analyzer }} + if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' }} id: warnings run: | echo ::set-output name=content::$(cat anaylze_output.txt) - name: Post Analyzed Warnings - if: ${{ success() && matrix.run-analyzer }} + if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' }} uses: mshick/add-pr-comment@v1 with: allow-repeats: true