[GH-ISSUE #2408] github.workspace points to actual workspace, not the volume act created #1106

Closed
opened 2026-03-01 21:48:57 +03:00 by kerem · 1 comment
Owner

Originally created by @pimlie on GitHub (Jul 28, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2408

Bug report info

act version:            0.2.64
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock

Command used with act

act -j docker-run-test

Describe issue

When running the below workflow, then the new_dir created in step 2 is not available in the docker container of step 4 even though it should use the same workspace

This is a minimal test case, in reality I need to run a docker container that requires an --init hence why I'm using this workaround of calling docker run myself in a custom action.

No response

Workflow content

name: Test

on:
  pull_request:

jobs:
  docker-run-test:
    runs-on: ubuntu-latest
    steps:
    - name: 💾 Check out repository
      uses: actions/checkout@v3

    - name: Create dir
      run: |
        echo "PWD=$PWD"
        mkdir -p ./new_dir

    - name: Check dir exists
      run: |
        test -d ./new_dir

    - uses: addnab/docker-run-action@v3
      with:
        image: ubuntu:latest
        options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}
        run: |
          echo "PWD=$PWD"
          ls -laF
          test -d ./new_dir

Relevant log output

[Test/docker-run-test]   ❌  Failure - Main addnab/docker-run-action@v3

Additional information

GITHUB_WORKSPACE doesn't work either

Originally created by @pimlie on GitHub (Jul 28, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2408 ### Bug report info ```plain text act version: 0.2.64 GOOS: linux GOARCH: amd64 NumCPU: 12 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock ``` ### Command used with act ```sh act -j docker-run-test ``` ### Describe issue When running the below workflow, then the `new_dir` created in step 2 is not available in the docker container of step 4 even though it should use the same workspace This is a minimal test case, in reality I need to run a docker container that requires an `--init` hence why I'm using this workaround of calling docker run myself in a custom action. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Test on: pull_request: jobs: docker-run-test: runs-on: ubuntu-latest steps: - name: 💾 Check out repository uses: actions/checkout@v3 - name: Create dir run: | echo "PWD=$PWD" mkdir -p ./new_dir - name: Check dir exists run: | test -d ./new_dir - uses: addnab/docker-run-action@v3 with: image: ubuntu:latest options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} run: | echo "PWD=$PWD" ls -laF test -d ./new_dir ``` ### Relevant log output ```sh [Test/docker-run-test] ❌ Failure - Main addnab/docker-run-action@v3 ``` ### Additional information GITHUB_WORKSPACE doesn't work either
kerem 2026-03-01 21:48:57 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 25, 2025):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2613634238 --> @github-actions[bot] commented on GitHub (Jan 25, 2025): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1106
No description provided.