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