From b300d50799b8e7a2d9cb9d2140a552c06720bb9f Mon Sep 17 00:00:00 2001 From: Kuba Wieczorek Date: Tue, 3 Oct 2023 12:06:44 +0100 Subject: [PATCH] [VAULT-20630] CI: Fix the CI workflow issue where we check out base ref instead of the ref that triggered the workflow run (#23453) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac1d96d70a..4eab152bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: # control checking out head instead of base ref by a GH label # if checkout-head label is added to a PR, checkout HEAD otherwise checkout base_ref - if: ${{ !contains(github.event.pull_request.labels.*.name, 'checkout-head') }} - run: echo "CHECKOUT_REF=${{ github.base_ref }}" >> "$GITHUB_ENV" + run: echo "CHECKOUT_REF=${{ github.ref }}" >> "$GITHUB_ENV" - if: ${{ contains(github.event.pull_request.labels.*.name, 'checkout-head') }} run: echo "CHECKOUT_REF=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV" - id: checkout-ref-output