From 7a2a9cd47ad0b9dcf2d21180491ace5e5c384cfe Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Thu, 29 Aug 2024 12:32:07 +0200 Subject: [PATCH] fix: only consider check-labels results for PRs check-labels workflow is intended to run only for PRs and the job is skipped for CI runs not triggered by PR event --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c99a9fe452..f103143754 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,4 +162,9 @@ jobs: if: always() steps: - name: Check whether all jobs pass - run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' + run: | + if [${{ github.event_name == 'pull_request' }}]; then + echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' + else + echo '${{ toJson(needs) }}' | jq -e 'del(."check-labels")' | jq -e 'all(.result == "success")' + fi