Repository navigation
Closed
Labels
Description
Describe the bug
The context is filled wrong when a job runs inside container:
${{ runner.temp }}${{ runner.tool_cache }}${{ github.action_path }}
All these variables report a path without respect to the docker environment.
To Reproduce
Here is the repo with a reproducer: https://github.com/rosik/ga-test-public/
jobs:
bug-in-container:
runs-on: ubuntu-20.04
container:
image: centos:7
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/repro # prints ${{ github.action_path }}
- run: echo runner.temp = ${{ runner.temp }}
- run: ls -al ${{ runner.temp }} || true
- run: echo runner.tool_cache = ${{ runner.tool_cache }}
- run: ls -al ${{ runner.tool_cache }} || true
Actual output
Expected behavior
From logs, we can see the docker container is created as
/usr/bin/docker create
--name f5a8984beffb4a899f1f2715bfce01bf_centos7_c77d38
--label 442333
--workdir /__w/ga-test-public/ga-test-public
--network github_network_7a20e69633be4acaaa53ae9145c97812
-e "HOME=/github/home"
-e GITHUB_ACTIONS=true
-e CI=true
-v "/var/run/docker.sock":"/var/run/docker.sock"
-v "/home/runner/work":"/__w"
-v "/home/runner/runners/2.276.1/externals":"/__e":ro
-v "/home/runner/work/_temp":"/__w/_temp"
-v "/home/runner/work/_actions":"/__w/_actions"
-v "/opt/hostedtoolcache":"/__t"
-v "/home/runner/work/_temp/_github_home":"/github/home"
-v "/home/runner/work/_temp/_github_workflow":"/github/workflow"
--entrypoint "tail" centos:7 "-f" "/dev/null"So I expect variables to be:
runner.temp == "/__w/_temp"runner.tool_cache == "/__t"github.action_path == "/__w/ga-test-public/ga-test-public/./.github/actions/repro"
Runner Version and Platform
Current runner version: '2.276.1'
Operating System
Ubuntu
20.04.2
LTS
Virtual Environment
Environment: ubuntu-20.04
Version: 20210131.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20210131.1/images/linux/Ubuntu2004-README.mdReacted by Jean-Christophe Fillion-Robin

Activity
rosik commentedon Feb 4, 2021
Extends #716
COMP: Improve "CI" GitHub Action workflow uploading package as artifact
COMP: Improve "CI" GitHub Action workflow uploading package as artifact
nikola-jokic commentedon Apr 4, 2022
Hi @rosik,
There is a PR fixing this issue, and as you noted. I will close this issue now but thank you for providing a repro repository. I am leaving a screenshot as a preview to prove that the fix is working as intended. Thank you for submitting it. I would normally wait for the PR to be merged, but since we have a previous issue stating this, and you already mentioned it, it seems alright to me to close this one. We can find it easily if something is wrong.

Please, if you see any issue with this screenshot that I haven't seen, don't hesitate to notify me 😊
rosik commentedon Apr 4, 2022
Yea, this is fine. And thanks for the fix!
ncfavier commentedon Aug 30, 2022
It seems like
runner.tempis handled inconsistently with containers, see actions/upload-pages-artifact#20 (comment).BUILD-7937 workaround github.action_path issue
BUILD-7937 workaround github.action_path issue
BUILD-7937 workaround github.action_path issue
BUILD-7937 workaround github.action_path issue
BUILD-7937 workaround github.action_path issue
feat(forge): fetch signed kernel sources and resolve the kernel confi…