Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 10b8409

Browse filesBrowse files
committed
docs: Agent Tool Cache
This updates and simplies the tool cache documentation to match the implementation in both and Relates actions#459
1 parent 5df6377 commit 10b8409
Copy full SHA for 10b8409

File tree

Expand file treeCollapse file tree

1 file changed

+3
-18
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-18
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+3-18Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -422,27 +422,12 @@ If you are experiencing problems while configuring Python on your self-hosted ru
422422

423423
### Linux
424424

425-
- The Python packages that are downloaded from `actions/python-versions` are originally compiled from source in `/opt/hostedtoolcache/` with the [--enable-shared](https://github.com/actions/python-versions/blob/94f04ae6806c6633c82db94c6406a16e17decd5c/builders/ubuntu-python-builder.psm1#L35) flag, which makes them non-relocatable.
426-
- By default runner downloads and install the tools to `/opt/hostedtoolcache`. The environment variable called `AGENT_TOOLSDIRECTORY` can be set to change this location.
427-
- In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`.
428-
- A more permanent way of setting the environment variable is to create a `.env` file in the same directory as your runner and to add `AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`. This ensures the variable is always set if your runner is configured as a service.
429-
- Create a directory called `hostedtoolcache` inside `/opt`.
430-
- The user starting the runner must have write permission to the `/opt/hostedtoolcache` directory. It is not possible to start the Linux runner with `sudo` and the `/opt` directory usually requires root privileges to write to. Check the current user and group that the runner belongs to by typing `ls -l` inside the runners root directory.
431-
- The runner can be granted write access to the `/opt/hostedtoolcache` directory using a few techniques:
432-
- The user starting the runner is the owner, and the owner has write permission.
433-
- The user starting the runner is in the owning group, and the owning group has write permission.
434-
- All users have write permission.
435-
- One quick way to grant access is to change the user and group of `/opt/hostedtoolcache` to be the same as the runners using `chown`.
436-
- `sudo chown runner-user:runner-group /opt/hostedtoolcache/`.
437-
- If your runner is configured as a service and you run into problems, make sure the user that the service is running as is correct. For more information, you can [check the status of your self-hosted runner](https://help.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#checking-the-status-of-the-service).
425+
- The Python packages that are downloaded from `actions/python-versions` are originally compiled from source with the [--enable-shared](https://github.com/actions/python-versions/blob/main/builders/ubuntu-python-builder.psm1#L37) flag.
426+
- By default runner downloads and install the tools to the `RUNNER_TOOL_CACHE` directory, however `AGENT_TOOLSDIRECTORY` can be set to override this location.
438427

439428
### Mac
440429

441-
- The same setup that applies to `Linux` also applies to `Mac`, just with a different tools cache directory.
442-
- Create a directory called `/Users/runner/hostedtoolcache`.
443-
- Set the `AGENT_TOOLSDIRECTORY` environment variable to `/Users/runner/hostedtoolcache`.
444-
- Change the permissions of `/Users/runner/hostedtoolcache` so that the runner has write access.
445-
430+
- The same setup that applies to `Linux` also applies to `Mac`
446431

447432
# Using Python without `setup-python`
448433

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.