From d29271f1da6697e5d0355ff59045256e32ed1ae9 Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 18 May 2020 10:58:12 +0200 Subject: [PATCH] github: update checkout action to v2 Checkout v1 has a known flake: https://github.com/actions/checkout/issues/23#issuecomment-572688577. For our linter to pass, we need to checkout our full history (default depth is 1 commit). We could set fetch-depth, but we will eventually move that depth past the linter's start point commit and need to implement another fix. Indead, we add an extra step in our linter to fetch full history so that the linter reference commit is found. --- .github/workflows/main.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75a5a86e..55c482f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: git checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: go cache uses: actions/cache@v1 @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest steps: - name: git checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: go cache uses: actions/cache@v1 @@ -99,7 +99,10 @@ jobs: runs-on: ubuntu-latest steps: - name: git checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 + + - name: Fetch all history for linter + run: git fetch --prune --unshallow - name: go cache uses: actions/cache@v1 @@ -134,7 +137,7 @@ jobs: - solaris-amd64 steps: - name: git checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: go cache uses: actions/cache@v1 @@ -170,7 +173,7 @@ jobs: - travis-race steps: - name: git checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: go cache uses: actions/cache@v1 @@ -225,7 +228,7 @@ jobs: - neutrino steps: - name: git checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: go cache uses: actions/cache@v1