Containerized action workspace directories seems to be rewritten on-the-fly
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
In 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_WORKSPACEis/github/workspaceand not/home/runner/work/my-repo-name/my-repo-name, that's fine :)SRC_WORKSPACEshould be the original/home/runner/work/my-repo-name/my-repo-nameas it's exactly how checkout action compose it but is/github/workspaceSRC_WORKSPACE_FOOwhere 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with containerized-action handling of the github.workspace and runner.workspace expressions, including environment-parameter conversion and Docker volume destinations. Reproduce the three environment-variable cases from the issue and verify that the original workspace path remains available where expected without changing the default /github/workspace behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions
- Domain
- ci-cd, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100