actions / actions/runner

docker based workflow cannot cache

Open
#2,522 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug keep
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
For setup-* actions they cache tools in RUNNER_TOOL_CACHE.
Doing so does not seems possible in docker based actions although the env variable is available.
For example on ubuntu github hosted runner, RUNNER_TOOL_CACHE has the path of /opt/hostedtoolcache which is not mounted onto the container, thus making it impossible to add a tool to cache and add it to path.

I tried other solutions by caching it in GITHUB_WORKSPACE but paths are not translated when being written to GITHUB_PATH, also the workspace may be the repository if checkout has been it before this action.

Expected behavior
I would expect the container workflow to have environment variables leading to usable directory and potentially paths to be converted when written in GITHUB_PATH as paths in env variables does not correspond to the runner ones.

Runner Version and Platform

Current runner version: '2.303.0'
Operating System
  Ubuntu
  22.04.2
  LTS
Runner Image
  Image: ubuntu-22.04
  Version: 20230402.1
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230402.1/images/linux/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230402.1
Runner Image Provisioner
  2.0.139.1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the issue with a Docker-based action on the stated Ubuntu runner, then trace how RUNNER_TOOL_CACHE and GITHUB_PATH are exposed and processed; done means setup-* tools can be cached and added to PATH with usable container paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, github-actions
Domain
ci-cd, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.