Containerized action workspace directories seems to be rewritten on-the-fly
See original GitHub issueIn a containerized action, where docker volumes are automatically mounted, the default github.workspace
property (something like /home/runner/work/my-repo-name/my-repo-name
) is automatically converted to the volume destination path (/github/workspace
).
Btw, this conversion seems to be applied on-the-fly on all action parameters, stopping ability to use the original workspace path (/home/runner/work/my-repo-name/my-repo-name
) in custom behaviors (such as - for instance - mounting workspace volumes in a docker-in-docker context)
Steps to reproduce the behavior:
- Define some environment variables in a containerized action
- name: Test
uses: gofrolist/molecule-action@v2
env:
DEST_WORKSPACE: ${{ github.workspace }}
SRC_WORKSPACE: ${{ runner.workspace }}/${{ github.event.repository.name }}
SRC_WORKSPACE_FOO: ${{ runner.workspace }}/foo/${{ github.event.repository.name }}
- See error
DEST_WORKSPACE
is/github/workspace
and not/home/runner/work/my-repo-name/my-repo-name
, that’s fine 😃SRC_WORKSPACE
should be the original/home/runner/work/my-repo-name/my-repo-name
as it’s exactly how checkout action compose it but is/github/workspace
SRC_WORKSPACE_FOO
where the original workspace is poorman’s obfuscated by injected a “foo” string is/home/runner/work/my-repo-name/foo/my-repo-name
Expected behavior
I expected to be able to use the original workspace /home/runner/work/my-repo-name/my-repo-name
directory string in custom situations.
Runner Version and Platform
The last available one on linux
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
GitHub Action I wrote doesn't have access to repo's files ...
I have a custom GitHub Action I've written as well with python as the base image in the Docker container but want the...
Read more >Using Docker Run inside of GitHub Actions
Here I'm creating a bind mount from the current workspace to /var/www , which is the working directory that my Docker image expects....
Read more >Backup station qnap download. 2. ...
(2) Customize view mode: timeline, thumbnail, list, folder, . 1. On Download Station 5 -> Settings -> Add-on (tab) it seems to show...
Read more >Using Docker Containers with GitHub Actions - YouTube
You'll learn: - What GitHub actions do, in brief - How to use a ... Using a container for a whole job -...
Read more >Hashicorp mysql provider. CSI providers are third-party ...
Create a directory named learn-terraform-docker-container. 0 and run terraform init and again, everything is fine: This tutorial demonstrates how to use a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d also like to add my backing to this issue … it’s all well and good saying don’t use explicit paths, but it is not uncommon for some tools to bake in explicit paths, I’m working with python, a couple of examples I’ve hit, virtualenv console scripts and coverage.xml files contain a reference to the explicit location the coverage was generated.
It is a totally reasonable request for either:
this is is the sort of annoyance that can ( and has today for me ) burn days of effort trying to workaround issues of compatibility between tests generated on the host, and static analysis tooling running in a an action.
I’m going to close out this issue until we hear back from you, please let us know if you are still seeing this issue!