I am seeing the $GITHUB_WORKSPACE variable being set incorrectly on pull request builds.
I’ve attached the relevant parts of our workflow script below.
What I am seeing is that for e.g. PR #8410, the $GITHUB_WORKSPACE variable has the value
/actions-runner/gh-ci-04/_work/myOrg/refs/pull/8401/merge in one job, and
/actions-runner/GH-CI-07/_work/myOrg/refs/heads/1.15-release in another, within the same CI run. I’ve also seen it check out several other unrelated PR branches.
This is confusing the
actions/checkout@v2 action, and causing it to check out the wrong branches.
name: CI env: JAVA_VERSION: 11.0.7 NOW: $(($(date +%s%N)/1000000)) on: pull_request: push: branches: - master jobs: evaluate-environment: name: Look at the environment runs-on: [self-hosted, our-machines] steps: - name: Print github workspace run: echo $GITHUB_WORKSPACE ... Some other jobs to build the PR here ...