From cc7b5cf136d4b9fb71f9234904c739c5ce039933 Mon Sep 17 00:00:00 2001 From: mkinney Date: Thu, 10 Feb 2022 14:06:09 -0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fcc8c02c9..82f946a45 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,11 +6,14 @@ on: paths-ignore: - '**.md' - '**.yml' + + # Note: This is different from "pull_request". Need to specify ref when doing checkouts. pull_request_target: branches: [ master ] paths-ignore: - '**.md' - '**.yml' + jobs: ci-check: @@ -21,6 +24,8 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} - name: Install cppcheck run: | @@ -60,6 +65,8 @@ jobs: uses: actions/checkout@v2 with: submodules: 'recursive' + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} - name: Setup Python uses: actions/setup-python@v2