From ea7261ac2c77ca909578013b94f915928f81cff8 Mon Sep 17 00:00:00 2001 From: Alexander Zautke Date: Tue, 26 Nov 2024 16:51:48 +0100 Subject: [PATCH] Update main.yml (#492) --- .github/workflows/main.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3d42ebf..da4e7d68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,8 +35,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Checkout code + - name: Checkout code (PR) uses: actions/checkout@v4 + if: github.event_name == 'pull_request' + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Checkout code (Main) + uses: actions/checkout@v4 + if: github.event_name != 'pull_request' # Java and .NET are already installed on ubuntu-latest