Skip to content

Commit 350c8a2

Browse files
committed
.github/workflows: Update the checkouts action to use the v1 version
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 f254e91 commit 350c8a2

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

Diff for: .github/workflows/build.yml

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

Diff for: .github/workflows/e2e-kind.yml

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

Diff for: .github/workflows/e2e-minikube.yml

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

Diff for: .github/workflows/e2e-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
e2e-tests:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v1
1414
- uses: actions/setup-go@v2
1515
with:
1616
go-version: '~1.16'

Diff for: .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

Diff for: .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

Diff for: .github/workflows/sanity.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
sanity:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v1
1616
- uses: actions/setup-go@v2
1717
with:
1818
go-version: '~1.16'

Diff for: .github/workflows/unit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
unit:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v1
1414
- uses: actions/setup-go@v2
1515
with:
1616
go-version: '~1.16'

Diff for: .github/workflows/verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
verify:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v1
1414
- uses: actions/setup-go@v2
1515
with:
1616
go-version: '~1.16'

0 commit comments

Comments
 (0)