From 9dd24285461e53a5cc112e8ca93daf4ce219f53d Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Tue, 25 Feb 2020 08:52:05 -0800 Subject: [PATCH] fix #100 - change RUNNER_TOOL_CACHE to /opt/hostedtoolcache (#103) --- pkg/runner/run_context.go | 2 +- pkg/runner/step_context.go | 2 +- pkg/runner/testdata/python/main.yml | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pkg/runner/testdata/python/main.yml diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index d02117bb..c8dbffa1 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -81,7 +81,7 @@ func (rc *RunContext) startJobContainer() common.Executor { bindModifiers = ":delegated" } - envList = append(envList, fmt.Sprintf("%s=%s", "RUNNER_TOOL_CACHE", "/toolcache")) + envList = append(envList, fmt.Sprintf("%s=%s", "RUNNER_TOOL_CACHE", "/opt/hostedtoolcache")) binds := []string{ fmt.Sprintf("%s:%s", "/var/run/docker.sock", "/var/run/docker.sock"), diff --git a/pkg/runner/step_context.go b/pkg/runner/step_context.go index 60beb641..b755dacb 100644 --- a/pkg/runner/step_context.go +++ b/pkg/runner/step_context.go @@ -159,7 +159,7 @@ func (sc *StepContext) newStepContainer(ctx context.Context, image string, cmd [ bindModifiers = ":delegated" } - envList = append(envList, fmt.Sprintf("%s=%s", "RUNNER_TOOL_CACHE", "/toolcache")) + envList = append(envList, fmt.Sprintf("%s=%s", "RUNNER_TOOL_CACHE", "/opt/hostedtoolcache")) binds := []string{ fmt.Sprintf("%s:%s", "/var/run/docker.sock", "/var/run/docker.sock"), diff --git a/pkg/runner/testdata/python/main.yml b/pkg/runner/testdata/python/main.yml new file mode 100644 index 00000000..9df75093 --- /dev/null +++ b/pkg/runner/testdata/python/main.yml @@ -0,0 +1,17 @@ +name: CI + +on: [push] + +jobs: + linter: + name: "Linting Python Code" + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1.1.1 + with: + python-version: 3.7 + + - run: python -c "import sys; print(sys.version)"