From 2ec41fa90ddd2316ea66f5da144190c0904677bd Mon Sep 17 00:00:00 2001 From: "anton.alekseev" Date: Fri, 24 Jul 2020 13:17:59 +0300 Subject: [PATCH] NO_ISSUE fix_ci_runs_on_wrong_commit --- .github/workflows/linux-checks.yaml | 22 +++++++++++++++++++--- .github/workflows/windows-checks.yaml | 7 ++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-checks.yaml b/.github/workflows/linux-checks.yaml index 583e6a72b2..e7a452efa2 100644 --- a/.github/workflows/linux-checks.yaml +++ b/.github/workflows/linux-checks.yaml @@ -18,9 +18,14 @@ jobs: GOPATH: /home/runner/work/assured-ledger/assured-ledger/go steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v2 with: path: go/src/github.com/insolar/assured-ledger + # Check out pull request's HEAD commit instead of the merge commit to + # work-around an issue where wrong a commit is being checked out. + # For more details, see: + # https://github.com/actions/checkout/issues/299. + ref: ${{ github.event.pull_request.head.sha }} - name: Set up go ${{env.GO_VERSION}} uses: actions/setup-go@v2 with: @@ -65,9 +70,14 @@ jobs: GOPATH: /home/runner/work/assured-ledger/assured-ledger/go steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v2 with: path: go/src/github.com/insolar/assured-ledger + # Check out pull request's HEAD commit instead of the merge commit to + # work-around an issue where wrong a commit is being checked out. + # For more details, see: + # https://github.com/actions/checkout/issues/299. + ref: ${{ github.event.pull_request.head.sha }} - name: Set up go ${{env.GO_VERSION}} uses: actions/setup-go@v2 with: @@ -145,7 +155,13 @@ jobs: KUBEVAL_VERSION: 0.15.0 steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v2 + with: + # Check out pull request's HEAD commit instead of the merge commit to + # work-around an issue where wrong a commit is being checked out. + # For more details, see: + # https://github.com/actions/checkout/issues/299. + ref: ${{ github.event.pull_request.head.sha }} - name: Set up go ${{env.GO_VERSION}} uses: actions/setup-go@v1 with: diff --git a/.github/workflows/windows-checks.yaml b/.github/workflows/windows-checks.yaml index 4e7c0462be..c3ee994db0 100644 --- a/.github/workflows/windows-checks.yaml +++ b/.github/workflows/windows-checks.yaml @@ -23,9 +23,14 @@ jobs: BUILD_TIME: 123456 steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v2 with: path: go/src/github.com/insolar/assured-ledger + # Check out pull request's HEAD commit instead of the merge commit to + # work-around an issue where wrong a commit is being checked out. + # For more details, see: + # https://github.com/actions/checkout/issues/299. + ref: ${{ github.event.pull_request.head.sha }} - name: Set up go ${{env.GO_VERSION}} uses: actions/setup-go@v2 with: