From c1d0fbc1d75d1be9ef1619cca9778eb7cdec47fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Tue, 14 Mar 2023 15:19:27 +0100 Subject: [PATCH] Don't try to find comment on master for visual diffs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rūdolfs Ošiņš --- .github/workflows/check-visual.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-visual.yml b/.github/workflows/check-visual.yml index 5a28a3c60..8743b42a1 100644 --- a/.github/workflows/check-visual.yml +++ b/.github/workflows/check-visual.yml @@ -85,14 +85,6 @@ jobs: path: | tests/artifacts/**/* - - name: Find Comment - uses: peter-evans/find-comment@v2 - id: fc - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: "github-actions[bot]" - body-includes: "**Visual diff results for latest changes**" - - name: Check for artifacts id: check_artifacts run: | @@ -102,6 +94,15 @@ jobs: echo "present=false" >> $GITHUB_OUTPUT fi + - name: Find Comment + if: github.ref != 'refs/heads/master' + uses: peter-evans/find-comment@v2 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: "github-actions[bot]" + body-includes: "**Visual diff results for latest changes**" + - name: Create or update comment if: github.ref != 'refs/heads/master' && steps.check_artifacts.outputs.present == 'false' uses: peter-evans/create-or-update-comment@v2