[GH-ISSUE #689] Issue: GITHUB_PATH should prepend #437

Closed
opened 2026-03-01 21:43:23 +03:00 by kerem · 0 comments
Owner

Originally created by @jsoref on GitHub (May 18, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/689

Act version

act version 0.2.22

Expected behaviour

Test should pass / adding lines to GITHUB_PATH should prepend them to the PATH

Actual behaviour

Entries are appended to the PATH (which means they lose out against system items, e.g. git -- which is tested by actions/checkout)

Workflow and/or repository

https://github.com/jsoref/github-path/blob/main/.github/workflows/a.yaml

workflow
name: env-and-path
on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: "Append to $GITHUB_PATH"
        run: |
          echo "$HOME/someFolder" >> $GITHUB_PATH
      - name: "Append some more to $GITHUB_PATH"
        run: |
          echo "$HOME/someOtherFolder" >> $GITHUB_PATH
      - name: "Check PATH"
        run: |
          echo "${PATH}"
          if [[ ! "${PATH}" =~ .*"$HOME/"someOtherFolder.*"$HOME/"someFolder.* ]]; then
            echo "${PATH} doesn't match .*someOtherFolder.*someFolder.*"
            exit 1
          fi
      - name: "Prepend"
        run: |
          if ls | grep -q 'called ls' ; then
            echo 'ls was overridden already?'
            exit 2
          fi
          path_add=$(mktemp -d)
          cat > $path_add/ls <<LS
          #!/bin/sh
          echo 'called ls'
          LS
          chmod +x $path_add/ls
          echo $path_add >> $GITHUB_PATH
      - name: "Verify prepend"
        run: |
          if ! ls | grep -q 'called ls' ; then
            echo 'ls was not overridden'
            exit 2
          fi
      - name: "Write single line env to $GITHUB_ENV"
        run: |
          echo "KEY=value" >> $GITHUB_ENV
      - name: "Check single line env"
        run: |
          if [[ "${KEY}" != "value" ]]; then
            echo "${KEY} dosen't == 'value'"
            exit 1
          fi
      - name: "Write multiline env to $GITHUB_ENV"
        run: |
          echo 'KEY2<<EOF' >> $GITHUB_ENV
                echo value2 >> $GITHUB_ENV
                echo 'EOF' >> $GITHUB_ENV
      - name: "Check multiline line env"
        run: |
          if [[ "${KEY2}" != "value2" ]]; then
            echo "${KEY2} dosen't == 'value'"
            exit 1
          fi


Steps to reproduce

act output

Log
/usr/local/bin/act --version; /usr/local/bin/act -v
act version 0.2.22
DEBU[0000] Loading environment from /Users/jsoref/code/nektos/issues/github-path/.env 
DEBU[0000] Loading secrets from /Users/jsoref/code/nektos/issues/github-path/.secrets 
DEBU[0000] Loading workflows from '/Users/jsoref/code/nektos/issues/github-path/.github/workflows' 
DEBU[0000] Loading workflows recursively                
DEBU[0000] Found workflow 'a.yaml' in '/Users/jsoref/code/nektos/issues/github-path/.github/workflows/a.yaml' 
DEBU[0000] Reading workflow '/Users/jsoref/code/nektos/issues/github-path/.github/workflows/a.yaml' 
DEBU[0000] Correcting if statements '/Users/jsoref/code/nektos/issues/github-path/.github/workflows/a.yaml' 
DEBU[0000] Planning event: push                         
DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] context env => map[ACT:true]                 
[env-and-path/build] 🚀  Start image=catthehacker/ubuntu:act-latest
DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0000] using github ref: refs/heads/main            
[env-and-path/build]   🐳  docker pull catthehacker/ubuntu:act-latest
DEBU[0000] Image exists? true                           
[env-and-path/build] Removed container: 97a67d0521f817789af73deb747f454563602537bd46f44f0584143e54bbb3f5
[env-and-path/build]   🐳  docker volume rm act-env-and-path-build
[env-and-path/build]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[env-and-path/build] Created container name=act-env-and-path-build id=0077e14ef3ab4ac5d5f5af7196bf25f2b93bf403c5ebe71027a62cbf57dcd132 from image catthehacker/ubuntu:act-latest (platform: )
[env-and-path/build] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[env-and-path/build]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[env-and-path/build] Starting container: 0077e14ef3ab4ac5d5f5af7196bf25f2b93bf403c5ebe71027a62cbf57dcd132
[env-and-path/build] Started container: 0077e14ef3ab4ac5d5f5af7196bf25f2b93bf403c5ebe71027a62cbf57dcd132
DEBU[0000] Writing entry to tarball workflow/event.json len:2 
DEBU[0000] Writing entry to tarball workflow/envs.txt len:0 
DEBU[0000] Writing entry to tarball workflow/paths.txt len:0 
[env-and-path/build] Extracting content to '/tmp/'
DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
[env-and-path/build] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
[env-and-path/build] ⭐  Run Append to $GITHUB_PATH
DEBU[0000] Wrote command '
echo "$HOME/someFolder" >> $GITHUB_PATH

' to 'workflow/0' 
DEBU[0000] Writing entry to tarball workflow/0 len:40   
[env-and-path/build] Extracting content to '/Users/jsoref/code/nektos/issues/github-path'
[env-and-path/build] Exec command '[bash --noprofile --norc -e -o pipefail /Users/jsoref/code/nektos/issues/github-path/workflow/0]'
[env-and-path/build]   ✅  Success - Append to $GITHUB_PATH
DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0001] using github ref: refs/heads/main            
DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0001] using github ref: refs/heads/main            
DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
[env-and-path/build] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
[env-and-path/build] ⭐  Run Append some more to $GITHUB_PATH
DEBU[0001] Wrote command '
echo "$HOME/someOtherFolder" >> $GITHUB_PATH

' to 'workflow/1' 
DEBU[0001] Writing entry to tarball workflow/1 len:45   
[env-and-path/build] Extracting content to '/Users/jsoref/code/nektos/issues/github-path'
[env-and-path/build] Exec command '[bash --noprofile --norc -e -o pipefail /Users/jsoref/code/nektos/issues/github-path/workflow/1]'
[env-and-path/build]   ✅  Success - Append some more to $GITHUB_PATH
DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0001] using github ref: refs/heads/main            
DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' 
DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' 
DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e 
DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 
DEBU[0001] using github ref: refs/heads/main            
DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] 
[env-and-path/build] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
[env-and-path/build] ⭐  Run Check PATH
DEBU[0001] Wrote command '
echo "${PATH}"
if [[ ! "${PATH}" =~ .*"$HOME/"someOtherFolder.*"$HOME/"someFolder.* ]]; then
  echo "${PATH} doesn't match .*someOtherFolder.*someFolder.*"
  exit 1
fi

' to 'workflow/2' 
DEBU[0001] Writing entry to tarball workflow/2 len:168  
[env-and-path/build] Extracting content to '/Users/jsoref/code/nektos/issues/github-path'
[env-and-path/build] Exec command '[bash --noprofile --norc -e -o pipefail /Users/jsoref/code/nektos/issues/github-path/workflow/2]'
| /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder
| /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder doesn't match .*someOtherFolder.*someFolder.*
[env-and-path/build]   ❌  Failure - Check PATH
DEBU[0001] exit with `FAILURE`: 1                       
DEBU[0001] exit with `FAILURE`: 1                       
DEBU[0001] exit with `FAILURE`: 1                       
DEBU[0001] exit with `FAILURE`: 1                       
DEBU[0001] exit with `FAILURE`: 1                       
DEBU[0001] exit with `FAILURE`: 1                       
DEBU[0001] exit with `FAILURE`: 1                       
Error: exit with `FAILURE`: 1
Originally created by @jsoref on GitHub (May 18, 2021). Original GitHub issue: https://github.com/nektos/act/issues/689 <!-- - 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` inside the code block below - If you've built `act` yourself, please provide commit hash --> ```none act version 0.2.22 ``` ## Expected behaviour <!-- - Describe how whole process should go and finish --> Test should pass / adding lines to GITHUB_PATH should prepend them to the PATH ## Actual behaviour <!-- - Describe the issue --> Entries are appended to the PATH (which means they lose out against system items, e.g. `git` -- which is tested by actions/checkout) ## Workflow and/or repository https://github.com/jsoref/github-path/blob/main/.github/workflows/a.yaml <details> <summary>workflow</summary> ```none name: env-and-path on: push jobs: build: runs-on: ubuntu-latest steps: - name: "Append to $GITHUB_PATH" run: | echo "$HOME/someFolder" >> $GITHUB_PATH - name: "Append some more to $GITHUB_PATH" run: | echo "$HOME/someOtherFolder" >> $GITHUB_PATH - name: "Check PATH" run: | echo "${PATH}" if [[ ! "${PATH}" =~ .*"$HOME/"someOtherFolder.*"$HOME/"someFolder.* ]]; then echo "${PATH} doesn't match .*someOtherFolder.*someFolder.*" exit 1 fi - name: "Prepend" run: | if ls | grep -q 'called ls' ; then echo 'ls was overridden already?' exit 2 fi path_add=$(mktemp -d) cat > $path_add/ls <<LS #!/bin/sh echo 'called ls' LS chmod +x $path_add/ls echo $path_add >> $GITHUB_PATH - name: "Verify prepend" run: | if ! ls | grep -q 'called ls' ; then echo 'ls was not overridden' exit 2 fi - name: "Write single line env to $GITHUB_ENV" run: | echo "KEY=value" >> $GITHUB_ENV - name: "Check single line env" run: | if [[ "${KEY}" != "value" ]]; then echo "${KEY} dosen't == 'value'" exit 1 fi - name: "Write multiline env to $GITHUB_ENV" run: | echo 'KEY2<<EOF' >> $GITHUB_ENV echo value2 >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - name: "Check multiline line env" run: | if [[ "${KEY2}" != "value2" ]]; then echo "${KEY2} dosen't == 'value'" exit 1 fi ``` </details> ## Steps to reproduce <!-- - Make sure to include full command with parameters you used to run `act`, example: 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` --> ## `act` output <!-- - Use `act` with `-v`/`--verbose` and paste output from your terminal in code block below --> <details> <summary>Log</summary> ```none /usr/local/bin/act --version; /usr/local/bin/act -v act version 0.2.22 DEBU[0000] Loading environment from /Users/jsoref/code/nektos/issues/github-path/.env DEBU[0000] Loading secrets from /Users/jsoref/code/nektos/issues/github-path/.secrets DEBU[0000] Loading workflows from '/Users/jsoref/code/nektos/issues/github-path/.github/workflows' DEBU[0000] Loading workflows recursively DEBU[0000] Found workflow 'a.yaml' in '/Users/jsoref/code/nektos/issues/github-path/.github/workflows/a.yaml' DEBU[0000] Reading workflow '/Users/jsoref/code/nektos/issues/github-path/.github/workflows/a.yaml' DEBU[0000] Correcting if statements '/Users/jsoref/code/nektos/issues/github-path/.github/workflows/a.yaml' DEBU[0000] Planning event: push DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0000] using github ref: refs/heads/main DEBU[0000] context env => map[ACT:true] [env-and-path/build] 🚀 Start image=catthehacker/ubuntu:act-latest DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0000] using github ref: refs/heads/main [env-and-path/build] 🐳 docker pull catthehacker/ubuntu:act-latest DEBU[0000] Image exists? true [env-and-path/build] Removed container: 97a67d0521f817789af73deb747f454563602537bd46f44f0584143e54bbb3f5 [env-and-path/build] 🐳 docker volume rm act-env-and-path-build [env-and-path/build] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [env-and-path/build] Created container name=act-env-and-path-build id=0077e14ef3ab4ac5d5f5af7196bf25f2b93bf403c5ebe71027a62cbf57dcd132 from image catthehacker/ubuntu:act-latest (platform: ) [env-and-path/build] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp] [env-and-path/build] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [env-and-path/build] Starting container: 0077e14ef3ab4ac5d5f5af7196bf25f2b93bf403c5ebe71027a62cbf57dcd132 [env-and-path/build] Started container: 0077e14ef3ab4ac5d5f5af7196bf25f2b93bf403c5ebe71027a62cbf57dcd132 DEBU[0000] Writing entry to tarball workflow/event.json len:2 DEBU[0000] Writing entry to tarball workflow/envs.txt len:0 DEBU[0000] Writing entry to tarball workflow/paths.txt len:0 [env-and-path/build] Extracting content to '/tmp/' DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0000] using github ref: refs/heads/main DEBU[0000] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0000] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0000] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0000] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0000] using github ref: refs/heads/main DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [env-and-path/build] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [env-and-path/build] ⭐ Run Append to $GITHUB_PATH DEBU[0000] Wrote command ' echo "$HOME/someFolder" >> $GITHUB_PATH ' to 'workflow/0' DEBU[0000] Writing entry to tarball workflow/0 len:40 [env-and-path/build] Extracting content to '/Users/jsoref/code/nektos/issues/github-path' [env-and-path/build] Exec command '[bash --noprofile --norc -e -o pipefail /Users/jsoref/code/nektos/issues/github-path/workflow/0]' [env-and-path/build] ✅ Success - Append to $GITHUB_PATH DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0001] using github ref: refs/heads/main DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0001] using github ref: refs/heads/main DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [env-and-path/build] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [env-and-path/build] ⭐ Run Append some more to $GITHUB_PATH DEBU[0001] Wrote command ' echo "$HOME/someOtherFolder" >> $GITHUB_PATH ' to 'workflow/1' DEBU[0001] Writing entry to tarball workflow/1 len:45 [env-and-path/build] Extracting content to '/Users/jsoref/code/nektos/issues/github-path' [env-and-path/build] Exec command '[bash --noprofile --norc -e -o pipefail /Users/jsoref/code/nektos/issues/github-path/workflow/1]' [env-and-path/build] ✅ Success - Append some more to $GITHUB_PATH DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0001] using github ref: refs/heads/main DEBU[0001] Loading slug from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Loading revision from git directory '/Users/jsoref/code/nektos/issues/github-path/.git' DEBU[0001] Found revision: 7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] HEAD points to '7b930312f882368184ec4fde5513b6e598e44e5e' DEBU[0001] Reference: name=refs/heads/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=refs/remotes/origin/main sha=7b930312f882368184ec4fde5513b6e598e44e5e DEBU[0001] Reference: name=HEAD sha=0000000000000000000000000000000000000000 DEBU[0001] using github ref: refs/heads/main DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [env-and-path/build] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/tmp/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/tmp/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:build GITHUB_PATH:/tmp/workflow/paths.txt GITHUB_REF:refs/heads/main GITHUB_REPOSITORY:jsoref/github-path GITHUB_REPOSITORY_OWNER:jsoref GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:7b930312f882368184ec4fde5513b6e598e44e5e GITHUB_TOKEN: GITHUB_WORKFLOW:env-and-path GITHUB_WORKSPACE:/Users/jsoref/code/nektos/issues/github-path IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_RELEASE:20.04 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [env-and-path/build] ⭐ Run Check PATH DEBU[0001] Wrote command ' echo "${PATH}" if [[ ! "${PATH}" =~ .*"$HOME/"someOtherFolder.*"$HOME/"someFolder.* ]]; then echo "${PATH} doesn't match .*someOtherFolder.*someFolder.*" exit 1 fi ' to 'workflow/2' DEBU[0001] Writing entry to tarball workflow/2 len:168 [env-and-path/build] Extracting content to '/Users/jsoref/code/nektos/issues/github-path' [env-and-path/build] Exec command '[bash --noprofile --norc -e -o pipefail /Users/jsoref/code/nektos/issues/github-path/workflow/2]' | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/someFolder:/root/someOtherFolder doesn't match .*someOtherFolder.*someFolder.* [env-and-path/build] ❌ Failure - Check PATH DEBU[0001] exit with `FAILURE`: 1 DEBU[0001] exit with `FAILURE`: 1 DEBU[0001] exit with `FAILURE`: 1 DEBU[0001] exit with `FAILURE`: 1 DEBU[0001] exit with `FAILURE`: 1 DEBU[0001] exit with `FAILURE`: 1 DEBU[0001] exit with `FAILURE`: 1 Error: exit with `FAILURE`: 1 ``` </details>
kerem 2026-03-01 21:43:23 +03:00
  • closed this issue
  • added the
    kind/bug
    label
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#437
No description provided.