Fix PR lint checkout depth
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled

Need to check out one deeper than the number of commits in order to compare to the target branch

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2025-12-18 20:50:25 +00:00 committed by Brad Davidson
parent e44a77d475
commit 421e364cc9

View file

@ -20,17 +20,19 @@ jobs:
name: Validate
runs-on: ubuntu-latest
steps:
- name: Set Commit Count
run: |
echo "GITHUB_CHECKOUT_FETCH_DEPTH=$( expr 1 + ${{ github.event.pull_request.commits }} )" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: ${{ github.event.pull_request.commits }}
fetch-depth: ${{ env.GITHUB_CHECKOUT_FETCH_DEPTH }}
- name: Set Go Version
run: |
source ./scripts/version.sh
{
echo "GOTOOLCHAIN=${VERSION_GOLANG/go}"
} >> "$GITHUB_ENV"
echo "GOTOOLCHAIN=${VERSION_GOLANG/go}" >> "$GITHUB_ENV"
- name: Setup Go
uses: actions/setup-go@v6