diff --git a/.github/workflows/pr-check-compliance-mapping.yml b/.github/workflows/pr-check-compliance-mapping.yml index 1ed78995bb..be934d5983 100644 --- a/.github/workflows/pr-check-compliance-mapping.yml +++ b/.github/workflows/pr-check-compliance-mapping.yml @@ -20,7 +20,13 @@ permissions: {} jobs: check-compliance-mapping: - if: contains(github.event.pull_request.labels.*.name, 'no-compliance-check') == false + if: >- + github.event.pull_request.state == 'open' && + contains(github.event.pull_request.labels.*.name, 'no-compliance-check') == false && + ( + (github.event.action != 'labeled' && github.event.action != 'unlabeled') + || github.event.label.name == 'no-compliance-check' + ) runs-on: ubuntu-latest timeout-minutes: 15 permissions: