[GH-ISSUE #555] Project directory is not mount inside act container #378

Closed
opened 2026-03-01 21:42:49 +03:00 by kerem · 3 comments
Owner

Originally created by @rockandska on GitHub (Mar 6, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/555

Act version

act version 0.2.20

Description

Since the act container mount the host docker socket instead of using DinD, tests who use docker and mount project dir as itself (docker run -v $(pwd):$(pwd) example-tests) fail because /github/workspace doesn't exist on the host side.

Expected behaviour

$ act 2> /dev/null
[Tests/docker-test] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[Tests/docker-test]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Tests/docker-test]   🐳  docker cp src=/tmp/act-test/. dst=/github/workspace
[Tests/docker-test] ⭐  Run actions/checkout@v2
[Tests/docker-test]   ✅  Success - actions/checkout@v2
[Tests/docker-test] ⭐  Run show workflow
| name: Tests
| on: [push, pull_request]
| jobs:
|   docker-test:
|     runs-on: ubuntu-18.04
|     steps:
|       - uses: actions/checkout@v2
|       - name: show workflow
|         run: cat $(pwd)/.github/workflows/test.yml
|       - name: show workflow in docker
|         run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml
[Tests/docker-test]   ✅  Success - show workflow
[Tests/docker-test] ⭐  Run show workflow in docker
| name: Tests
| on: [push, pull_request]
| jobs:
|   docker-test:
|     runs-on: ubuntu-18.04
|     steps:
|       - uses: actions/checkout@v2
|       - name: show workflow
|         run: cat $(pwd)/.github/workflows/test.yml
|       - name: show workflow in docker
|         run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml
[Tests/docker-test]   ✅  Success - show workflow in docker

Actual behaviour

$ act 2> /dev/null
[Tests/docker-test] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[Tests/docker-test]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Tests/docker-test]   🐳  docker cp src=/tmp/act-test/. dst=/github/workspace
[Tests/docker-test] ⭐  Run actions/checkout@v2
[Tests/docker-test]   ✅  Success - actions/checkout@v2
[Tests/docker-test] ⭐  Run show workflow
| name: Tests
| on: [push, pull_request]
| jobs:
|   docker-test:
|     runs-on: ubuntu-18.04
|     steps:
|       - uses: actions/checkout@v2
|       - name: show workflow
|         run: cat $(pwd)/.github/workflows/test.yml
|       - name: show workflow in docker
|         run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml
[Tests/docker-test]   ✅  Success - show workflow
[Tests/docker-test] ⭐  Run show workflow in docker
| cat: can't open '/github/workspace/.github/workflows/test.yml': No such file or directory
[Tests/docker-test]   ❌  Failure - show workflow in docker

Workflow and/or repository

workflow
name: Tests
on: [push, pull_request]
jobs:
  docker-test:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - name: show workflow
        run: cat $(pwd)/.github/workflows/test.yml
      - name: show workflow in docker
        run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml

Steps to reproduce

$ mkdir -p /tmp/act-test/.github/workflows
$ cd !$
$ cat > test.yml
name: Tests
on: [push, pull_request]
jobs:
  docker-test:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - name: show workflow
        run: cat $(pwd)/.github/workflows/test.yml
      - name: show workflow in docker
        run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml
$ cd ../..
$ git init
$ act

act output

Log
DEBU[0000] Loading environment from /tmp/act-test/.env  
DEBU[0000] Loading secrets from /tmp/act-test/.secrets  
DEBU[0000] Loading workflows from '/tmp/act-test/.github/workflows' 
DEBU[0000] Reading workflow '/tmp/act-test/.github/workflows/test.yml' 
DEBU[0000] Planning event: push                         
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] context env => map[ACT:true]                 
[Tests/docker-test] 🚀  Start image=nektos/act-environments-ubuntu:18.04
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
[Tests/docker-test]   🐳  docker pull nektos/act-environments-ubuntu:18.04
DEBU[0001] Image exists? true                           
[Tests/docker-test] Removed container: c51071c27b89ab25f74ddfb370a91cdd86f1886d83f7776f0cb6586822585995
[Tests/docker-test]   🐳  docker volume rm act-Tests-docker-test
[Tests/docker-test]   🐳  docker create image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Tests/docker-test] Created container name=act-Tests-docker-test id=3d5c9b92465dce3c38e0cd7d5488ab08d063691efc2d2db657f4893d53a2225d from image nektos/act-environments-ubuntu:18.04
[Tests/docker-test] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[Tests/docker-test]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Tests/docker-test] Starting container: 3d5c9b92465dce3c38e0cd7d5488ab08d063691efc2d2db657f4893d53a2225d
[Tests/docker-test] Started container: 3d5c9b92465dce3c38e0cd7d5488ab08d063691efc2d2db657f4893d53a2225d
[Tests/docker-test]   🐳  docker cp src=/tmp/act-test/. dst=/github/workspace
[Tests/docker-test] Exec command '[mkdir -p /github/workspace]'
DEBU[0002] Writing tarball /tmp/act819143712 from /tmp/act-test/. 
DEBU[0002] Stripping prefix:/tmp/act-test/ src:/tmp/act-test/. 
[Tests/docker-test] Extracting content from '/tmp/act819143712' to '/github/workspace'
DEBU[0002] Writing entry to tarball workflow/event.json len:2 
DEBU[0002] Writing entry to tarball workflow/envs.txt len:0 
DEBU[0002] Writing entry to tarball home/.act len:0     
[Tests/docker-test] Extracting content to '/github/'
DEBU[0002] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0002] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0003] context env => map[ACT:true]                 
DEBU[0003] context env => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] 
DEBU[0003] setupEnv: map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] 
[Tests/docker-test] ⭐  Run actions/checkout@v2
DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' 
[Tests/docker-test] Skipping actions/checkout
[Tests/docker-test]   ✅  Success - actions/checkout@v2
DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0003] context env => map[ACT:true]                 
DEBU[0003] context env => map[ACT:true CI:true GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] 
DEBU[0003] setupEnv: map[ACT:true CI:true GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] 
[Tests/docker-test] ⭐  Run show workflow
DEBU[0003] Wrote command 'cat $(pwd)/.github/workflows/test.yml' to 'workflow/1' 
DEBU[0003] Writing entry to tarball workflow/1 len:37   
[Tests/docker-test] Extracting content to '/github/'
[Tests/docker-test] Exec command '[bash --noprofile --norc -eo pipefail /github/workflow/1]'
| name: Tests
| on: [push, pull_request]
| jobs:
|   docker-test:
|     runs-on: ubuntu-18.04
|     steps:
|       - uses: actions/checkout@v2
|       - name: show workflow
|         run: cat $(pwd)/.github/workflows/test.yml
|       - name: show workflow in docker
|         run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml
[Tests/docker-test]   ✅  Success - show workflow
DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0004] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0004] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0004] context env => map[ACT:true]                 
DEBU[0004] context env => map[ACT:true CI:true GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] 
DEBU[0004] setupEnv: map[ACT:true CI:true GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] 
[Tests/docker-test] ⭐  Run show workflow in docker
DEBU[0004] Wrote command 'docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml' to 'workflow/2' 
DEBU[0004] Writing entry to tarball workflow/2 len:77   
[Tests/docker-test] Extracting content to '/github/'
[Tests/docker-test] Exec command '[bash --noprofile --norc -eo pipefail /github/workflow/2]'
| cat: can't open '/github/workspace/.github/workflows/test.yml': No such file or directory
[Tests/docker-test]   ❌  Failure - show workflow in docker
DEBU[0005] exit with `FAILURE`: 1                       
Error: exit with `FAILURE`: 1

Suggestions

Mount the project dir in act container too
docker run -v $(pwd):$(pwd) -v $(pwd):/github/worksdpace nektos/act-environments-ubuntu:18.04

Originally created by @rockandska on GitHub (Mar 6, 2021). Original GitHub issue: https://github.com/nektos/act/issues/555 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## Act version <!-- Paste output of `act --version` --> ```none act version 0.2.20 ``` ## Description Since the act container mount the host docker socket instead of using DinD, tests who use docker and mount project dir as itself (docker run -v $(pwd):$(pwd) example-tests) fail because `/github/workspace` doesn't exist on the host side. ## Expected behaviour <!-- Describe how whole process should go and finish --> ``` $ act 2> /dev/null [Tests/docker-test] 🚀 Start image=nektos/act-environments-ubuntu:18.04 [Tests/docker-test] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Tests/docker-test] 🐳 docker cp src=/tmp/act-test/. dst=/github/workspace [Tests/docker-test] ⭐ Run actions/checkout@v2 [Tests/docker-test] ✅ Success - actions/checkout@v2 [Tests/docker-test] ⭐ Run show workflow | name: Tests | on: [push, pull_request] | jobs: | docker-test: | runs-on: ubuntu-18.04 | steps: | - uses: actions/checkout@v2 | - name: show workflow | run: cat $(pwd)/.github/workflows/test.yml | - name: show workflow in docker | run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml [Tests/docker-test] ✅ Success - show workflow [Tests/docker-test] ⭐ Run show workflow in docker | name: Tests | on: [push, pull_request] | jobs: | docker-test: | runs-on: ubuntu-18.04 | steps: | - uses: actions/checkout@v2 | - name: show workflow | run: cat $(pwd)/.github/workflows/test.yml | - name: show workflow in docker | run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml [Tests/docker-test] ✅ Success - show workflow in docker ``` ## Actual behaviour <!-- Describe what happened --> ``` $ act 2> /dev/null [Tests/docker-test] 🚀 Start image=nektos/act-environments-ubuntu:18.04 [Tests/docker-test] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Tests/docker-test] 🐳 docker cp src=/tmp/act-test/. dst=/github/workspace [Tests/docker-test] ⭐ Run actions/checkout@v2 [Tests/docker-test] ✅ Success - actions/checkout@v2 [Tests/docker-test] ⭐ Run show workflow | name: Tests | on: [push, pull_request] | jobs: | docker-test: | runs-on: ubuntu-18.04 | steps: | - uses: actions/checkout@v2 | - name: show workflow | run: cat $(pwd)/.github/workflows/test.yml | - name: show workflow in docker | run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml [Tests/docker-test] ✅ Success - show workflow [Tests/docker-test] ⭐ Run show workflow in docker | cat: can't open '/github/workspace/.github/workflows/test.yml': No such file or directory [Tests/docker-test] ❌ Failure - show workflow in docker ``` ## Workflow and/or repository <details> <summary>workflow</summary> ```none name: Tests on: [push, pull_request] jobs: docker-test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: show workflow run: cat $(pwd)/.github/workflows/test.yml - name: show workflow in docker run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml ``` </details> ## Steps to reproduce <!-- Make sure to include command you used to run `act` e.g.: 1. Clone example repo (https://github.com/cplee/github-actions-demo) 2. Enter cloned repo directory 3. Run `act -s SUPER_SECRET=im-a-value` --> ``` $ mkdir -p /tmp/act-test/.github/workflows $ cd !$ $ cat > test.yml name: Tests on: [push, pull_request] jobs: docker-test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: show workflow run: cat $(pwd)/.github/workflows/test.yml - name: show workflow in docker run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml $ cd ../.. $ git init $ act ``` ## `act` output <!-- Paste output from your terminal, use `-v` or `--verbose` for richer output --> <details> <summary>Log</summary> ```none DEBU[0000] Loading environment from /tmp/act-test/.env DEBU[0000] Loading secrets from /tmp/act-test/.secrets DEBU[0000] Loading workflows from '/tmp/act-test/.github/workflows' DEBU[0000] Reading workflow '/tmp/act-test/.github/workflows/test.yml' DEBU[0000] Planning event: push DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' DEBU[0000] context env => map[ACT:true] [Tests/docker-test] 🚀 Start image=nektos/act-environments-ubuntu:18.04 DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' [Tests/docker-test] 🐳 docker pull nektos/act-environments-ubuntu:18.04 DEBU[0001] Image exists? true [Tests/docker-test] Removed container: c51071c27b89ab25f74ddfb370a91cdd86f1886d83f7776f0cb6586822585995 [Tests/docker-test] 🐳 docker volume rm act-Tests-docker-test [Tests/docker-test] 🐳 docker create image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Tests/docker-test] Created container name=act-Tests-docker-test id=3d5c9b92465dce3c38e0cd7d5488ab08d063691efc2d2db657f4893d53a2225d from image nektos/act-environments-ubuntu:18.04 [Tests/docker-test] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp] [Tests/docker-test] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Tests/docker-test] Starting container: 3d5c9b92465dce3c38e0cd7d5488ab08d063691efc2d2db657f4893d53a2225d [Tests/docker-test] Started container: 3d5c9b92465dce3c38e0cd7d5488ab08d063691efc2d2db657f4893d53a2225d [Tests/docker-test] 🐳 docker cp src=/tmp/act-test/. dst=/github/workspace [Tests/docker-test] Exec command '[mkdir -p /github/workspace]' DEBU[0002] Writing tarball /tmp/act819143712 from /tmp/act-test/. DEBU[0002] Stripping prefix:/tmp/act-test/ src:/tmp/act-test/. [Tests/docker-test] Extracting content from '/tmp/act819143712' to '/github/workspace' DEBU[0002] Writing entry to tarball workflow/event.json len:2 DEBU[0002] Writing entry to tarball workflow/envs.txt len:0 DEBU[0002] Writing entry to tarball home/.act len:0 [Tests/docker-test] Extracting content to '/github/' DEBU[0002] Loading slug from git directory '/tmp/act-test/.git' DEBU[0002] Loading revision from git directory '/tmp/act-test/.git' DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' DEBU[0003] context env => map[ACT:true] DEBU[0003] context env => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] DEBU[0003] setupEnv: map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] [Tests/docker-test] ⭐ Run actions/checkout@v2 DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' [Tests/docker-test] Skipping actions/checkout [Tests/docker-test] ✅ Success - actions/checkout@v2 DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' DEBU[0003] context env => map[ACT:true] DEBU[0003] context env => map[ACT:true CI:true GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] DEBU[0003] setupEnv: map[ACT:true CI:true GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] [Tests/docker-test] ⭐ Run show workflow DEBU[0003] Wrote command 'cat $(pwd)/.github/workflows/test.yml' to 'workflow/1' DEBU[0003] Writing entry to tarball workflow/1 len:37 [Tests/docker-test] Extracting content to '/github/' [Tests/docker-test] Exec command '[bash --noprofile --norc -eo pipefail /github/workflow/1]' | name: Tests | on: [push, pull_request] | jobs: | docker-test: | runs-on: ubuntu-18.04 | steps: | - uses: actions/checkout@v2 | - name: show workflow | run: cat $(pwd)/.github/workflows/test.yml | - name: show workflow in docker | run: docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml [Tests/docker-test] ✅ Success - show workflow DEBU[0003] Loading slug from git directory '/tmp/act-test/.git' DEBU[0003] Loading revision from git directory '/tmp/act-test/.git' DEBU[0004] Loading slug from git directory '/tmp/act-test/.git' DEBU[0004] Loading revision from git directory '/tmp/act-test/.git' DEBU[0004] context env => map[ACT:true] DEBU[0004] context env => map[ACT:true CI:true GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] DEBU[0004] setupEnv: map[ACT:true CI:true GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_ENV:/github/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_REF: GITHUB_REPOSITORY: GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home] [Tests/docker-test] ⭐ Run show workflow in docker DEBU[0004] Wrote command 'docker run -v $(pwd):$(pwd) bash:3.2.57 cat $(pwd)/.github/workflows/test.yml' to 'workflow/2' DEBU[0004] Writing entry to tarball workflow/2 len:77 [Tests/docker-test] Extracting content to '/github/' [Tests/docker-test] Exec command '[bash --noprofile --norc -eo pipefail /github/workflow/2]' | cat: can't open '/github/workspace/.github/workflows/test.yml': No such file or directory [Tests/docker-test] ❌ Failure - show workflow in docker DEBU[0005] exit with `FAILURE`: 1 Error: exit with `FAILURE`: 1 ``` </details> ## Suggestions Mount the project dir in act container too docker run -v $(pwd):$(pwd) -v $(pwd):/github/worksdpace nektos/act-environments-ubuntu:18.04
kerem 2026-03-01 21:42:49 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@catthehacker commented on GitHub (Mar 6, 2021):

Duplicate #551, #410

<!-- gh-comment-id:792049045 --> @catthehacker commented on GitHub (Mar 6, 2021): Duplicate #551, #410
Author
Owner

@catthehacker commented on GitHub (Mar 29, 2021):

@rockandska I guess that this issue is fixed as #567 has been merged?

<!-- gh-comment-id:809687751 --> @catthehacker commented on GitHub (Mar 29, 2021): @rockandska I guess that this issue is fixed as #567 has been merged?
Author
Owner

@rockandska commented on GitHub (Mar 29, 2021):

Sorry @catthehacker , did not link this issue with the PR.

<!-- gh-comment-id:809688687 --> @rockandska commented on GitHub (Mar 29, 2021): Sorry @catthehacker , did not link this issue with the PR.
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#378
No description provided.