From 3acfe5ea524082f0e658fab852b4fe8cc4e1bc66 Mon Sep 17 00:00:00 2001 From: Kuba Wieczorek Date: Tue, 3 Oct 2023 14:58:35 +0100 Subject: [PATCH] [VAULT-20630] CI: Use 'ref' (not 'base_ref') as a default git reference to check out code in the test-go GHA workflow (#23458) --- .github/workflows/ci.yml | 4 ++-- .github/workflows/test-go.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4eab152bd6a9..823d7171ca87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,8 +60,8 @@ jobs: with: github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} no-restore: true # don't download them on a cache hit - # 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 + # control checking out head instead of default ref by a GH label + # if checkout-head label is added to a PR, checkout HEAD otherwise checkout ref - if: ${{ !contains(github.event.pull_request.labels.*.name, 'checkout-head') }} run: echo "CHECKOUT_REF=${{ github.ref }}" >> "$GITHUB_ENV" - if: ${{ contains(github.event.pull_request.labels.*.name, 'checkout-head') }} diff --git a/.github/workflows/test-go.yml b/.github/workflows/test-go.yml index a5f3e5009de8..34f6cccc327b 100644 --- a/.github/workflows/test-go.yml +++ b/.github/workflows/test-go.yml @@ -70,7 +70,7 @@ on: checkout-ref: description: The ref to use for checkout. required: false - default: ${{ github.base_ref }} + default: ${{ github.ref }} type: string env: ${{ fromJSON(inputs.env-vars) }}