Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No access to non-mounted directories #353

Closed
elesel opened this issue Sep 13, 2022 · 1 comment · Fixed by #519
Closed

No access to non-mounted directories #353

elesel opened this issue Sep 13, 2022 · 1 comment · Fixed by #519
Labels
documentation Improvements or additions to documentation

Comments

@elesel
Copy link

elesel commented Sep 13, 2022

Would you please update the documentation to reflect which directories the action will have access to when running from Docker? I was trying to specify junit_files like this:

- name: Publish test results
  uses: EnricoMi/publish-unit-test-result-action@v2
  if: always()
  with:
    check_name: Test Results for ${{ github.workflow }}
    junit_files: ${{ runner.temp }}/pytest-reports/**/*.xml

but GitHub only provides a few volume mounts, and ${{ runner.temp }} isn't covered by them. I moved the files to a relative directory and this is working fine, but I had to debug a bit to reach this conclusion. FWIW here are the relevant docker run command line options that GitHub uses to launch this action:

--workdir /github/workspace
-v "/var/run/docker.sock":"/var/run/docker.sock"
-v "/home/runner/work/_temp/_github_home":"/github/home"
-v "/home/runner/work/_temp/_github_workflow":"/github/workflow"
-v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands"
-v "/home/runner/work/<repo_name>/<repo_name>":"/github/workspace"

You could even go so far as to fail the action if any of the *_files args attempt to reference anything not under the four mounted directories.

@EnricoMi
Copy link
Owner

Yes, running the action in Docker container has very limited access to paths. Ideally is using relative paths. I will improve documentation to stress this fact. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants