diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 73ae685048..a5b25e0839 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,16 +25,17 @@ jobs: id: go - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: - fetch-depth: 1 - path: go/src/github.com/pingcap/tidb-operator + ref: ${{ github.event.pull_request.head.sha }} + path: go/src/github.com/${{ github.repository }} - name: make ${{ matrix.target }} run: | # workaround for https://github.com/actions/setup-go/issues/14 - export GOPATH=/home/runner/work/tidb-operator/go + export GOPATH=${GITHUB_WORKSPACE}/go export PATH=$PATH:$GOPATH/bin make $target + working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} env: target: ${{ matrix.target }}