Skip to content

Commit a2142c1

Browse files
authored
.github/workflows: Update the checkouts action to use the v1 version (#2463)
Update any relevant workflows and downgrade the checkouts action from the v2 to v1 version. This change is predicated on the problematic checkouts@v2 behavior that can lead to an increased change of regressing when landing changes to the default branch (e.g. master/main). This is because there's an existing bug in the v2 world where PRs can checkout the wrong HEAD commit, leading to scenarios where you're testing against an out-of-date commit compared to what's in the master branch. A concrete use case is when a PR is opened, and that PR checks out the current HEAD commit from master, and then a change lands in the master branch, and any subsequent workflow retries for that PR will result in that previous HEAD commit being checked out. There are workarounds that exist, like rebasing the existing PR, or like explicitly pointing the ref to the default branch, but this interaction isn't ideal with workflows are triggered on pushes to branches on top of reacting to pull request triggers. The simplest solution is to revert back to the v1 version and find a better longer term solution. Signed-off-by: timflannagan <[email protected]>
1 parent bfe8f0f commit a2142c1

9 files changed

+9
-9
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Check out the repo
9-
uses: actions/checkout@v2
9+
uses: actions/checkout@v1
1010
- name: Build the container image
1111
uses: docker/build-push-action@v2
1212
with:

.github/workflows/e2e-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
e2e-tests:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v1
1212
- uses: actions/setup-go@v2
1313
with:
1414
go-version: '~1.16'

.github/workflows/goreleaser.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v1
1414
with:
1515
fetch-depth: 0
1616
- name: Set up Go

.github/workflows/quickstart.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
install-quickstart:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v1
1111
- run: |
1212
curl -sLo kind "$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '[.assets[] | select(.name == "kind-linux-amd64")] | first | .browser_download_url')"
1313
chmod +x kind

.github/workflows/run-kind-local.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
e2e-kind:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v1
1111
- uses: actions/setup-go@v2
1212
with:
1313
go-version: '~1.16'

.github/workflows/run-minikube-local.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
e2e-minikube:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v1
1111
- uses: actions/setup-go@v2
1212
with:
1313
go-version: '~1.16'

.github/workflows/sanity.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
sanity:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v1
1212
- uses: actions/setup-go@v2
1313
with:
1414
go-version: '~1.16'

.github/workflows/unit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
unit:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v1
1212
- uses: actions/setup-go@v2
1313
with:
1414
go-version: '~1.16'

.github/workflows/verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
verify:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v1
1212
- uses: actions/setup-go@v2
1313
with:
1414
go-version: '~1.16'

0 commit comments

Comments
 (0)