From 8710772864050b4d3417cff61a6b2626184b090d Mon Sep 17 00:00:00 2001
From: Paul Abel
Date: Thu, 20 Jun 2024 18:06:31 +0100
Subject: [PATCH] only checkout specified branch
---
.github/workflows/regression.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml
index db810cedd5..3377fc572b 100644
--- a/.github/workflows/regression.yml
+++ b/.github/workflows/regression.yml
@@ -40,6 +40,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+ with:
+ ref: ${{ inputs.branch && inputs.branch || github.event.repository.default_branch }}
- name: Output Variables
id: vars
@@ -68,7 +70,7 @@ jobs:
echo "latest_kindest_node_versions=$kindest_versions" >> $GITHUB_OUTPUT
source .github/data/version.txt
./.github/scripts/variables.sh stable_tag >> $GITHUB_OUTPUT
- branch=main
+ branch=${{ github.event.repository.default_branch }}
if [ -n "${{ inputs.branch }}" ]; then
branch=${{ inputs.branch }}
fi
@@ -103,6 +105,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+ with:
+ ref: ${{ needs.checks.outputs.branch }}
- name: Authenticate to Google Cloud
id: auth
@@ -180,6 +184,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+ with:
+ ref: ${{ needs.checks.outputs.branch }}
- id: set-matrix
run: |
@@ -198,6 +204,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+ with:
+ ref: ${{ needs.checks.outputs.branch }}
- name: Set image variables
id: image_details