From 19107ec627486fe7c176a7f90d3173128cb08be4 Mon Sep 17 00:00:00 2001 From: Fred Date: Mon, 19 Aug 2024 09:34:25 -0300 Subject: [PATCH] fix: checkout the PR version --- .../pull_request_maven_long_running.yml | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull_request_maven_long_running.yml b/.github/workflows/pull_request_maven_long_running.yml index ce10653607..213ae34c0e 100644 --- a/.github/workflows/pull_request_maven_long_running.yml +++ b/.github/workflows/pull_request_maven_long_running.yml @@ -66,14 +66,22 @@ jobs: java-version: [ 17 ] # Only the first supported LTS; already too many jobs here. timeout-minutes: 120 steps: - - name: Checkout timefold-quickstarts + - name: Checkout timefold-quickstarts (PR) + id: checkout-quickstarts-pr uses: actions/checkout@v4 with: repository: ${{ github.actor }}/timefold-quickstarts ref: ${{ github.head_ref }} path: ./timefold-quickstarts fetch-depth: 0 # Otherwise merge will fail on account of not having history. - + - name: Checkout timefold-quickstarts + if: steps.checkout-quickstarts-pr.outcome != 'success' + uses: actions/checkout@v4 + with: + repository: TimefoldAI/timefold-quickstarts + ref: ${{ github.head_ref }} + path: ./timefold-quickstarts + fetch-depth: 0 # Otherwise merge will fail on account of not having history. - name: Checkout timefold-solver (PR) # Checkout the PR branch first, if it exists id: checkout-solver uses: actions/checkout@v4 @@ -124,14 +132,22 @@ jobs: java-version: [ 17 ] # Only the first supported LTS; already too many jobs here. timeout-minutes: 120 steps: - - name: Checkout timefold-quickstarts + - name: Checkout timefold-quickstarts (PR) + id: checkout-quickstarts-pr uses: actions/checkout@v4 with: repository: ${{ github.actor }}/timefold-quickstarts ref: ${{ github.head_ref }} path: ./timefold-quickstarts fetch-depth: 0 # Otherwise merge will fail on account of not having history. - + - name: Checkout timefold-quickstarts + if: steps.checkout-quickstarts-pr.outcome != 'success' + uses: actions/checkout@v4 + with: + repository: TimefoldAI/timefold-quickstarts + ref: ${{ github.head_ref }} + path: ./timefold-quickstarts + fetch-depth: 0 # Otherwise merge will fail on account of not having history. - name: Checkout timefold-solver (PR) # Checkout the PR branch first, if it exists id: checkout-solver uses: actions/checkout@v4 @@ -204,14 +220,22 @@ jobs: java-version: [ 17 ] # Only the first supported LTS; already too many jobs here. timeout-minutes: 120 steps: - - name: Checkout timefold-quickstarts + - name: Checkout timefold-quickstarts (PR) + id: checkout-quickstarts-pr uses: actions/checkout@v4 with: repository: ${{ github.actor }}/timefold-quickstarts ref: ${{ github.head_ref }} path: ./timefold-quickstarts fetch-depth: 0 # Otherwise merge will fail on account of not having history. - + - name: Checkout timefold-quickstarts + if: steps.checkout-quickstarts-pr.outcome != 'success' + uses: actions/checkout@v4 + with: + repository: TimefoldAI/timefold-quickstarts + ref: ${{ github.head_ref }} + path: ./timefold-quickstarts + fetch-depth: 0 # Otherwise merge will fail on account of not having history. - name: Checkout timefold-solver (PR) # Checkout the PR branch first, if it exists id: checkout-solver uses: actions/checkout@v4