From a4ef10f5cce31e60b884ef907f8f4d11832bba2d Mon Sep 17 00:00:00 2001 From: Daniel Adam Date: Fri, 26 Aug 2022 18:23:03 +0200 Subject: [PATCH] Fix workflows for pull-requests from forks --- .github/workflows/ctt-bot.yml | 2 +- .github/workflows/sonar-cloud-analysis.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ctt-bot.yml b/.github/workflows/ctt-bot.yml index 5d3dc721c9..5e7bdecdba 100644 --- a/.github/workflows/ctt-bot.yml +++ b/.github/workflows/ctt-bot.yml @@ -1,6 +1,6 @@ name: OCF Conformance Bot on: - pull_request: + pull_request_target: types: - synchronize - opened diff --git a/.github/workflows/sonar-cloud-analysis.yml b/.github/workflows/sonar-cloud-analysis.yml index 108a1598b6..aa9a30ac30 100644 --- a/.github/workflows/sonar-cloud-analysis.yml +++ b/.github/workflows/sonar-cloud-analysis.yml @@ -84,6 +84,8 @@ jobs: hub_args: ${{ matrix.hub_args }} sonar-cloud-scan: + # don't run for forks + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) name: Sonar Cloud scan runs-on: ubuntu-22.04 env: