Repository: nektos/act (language: go)

Issue:
Environment variables not available in the context of the the workflow step definition
### Bug report info

```plain text
› act --bug-report
act version:            0.2.32-20-gbc17371
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 10
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:
        /Users/matthewceroni/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
        .actrc:
                -P self-hosted=catthehacker/ubuntu:act-latest
                --bind
                -v
Build info:
        Go version:            go1.19
        Module path:           command-line-arguments
        Main version:
        Main path:
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.32-20-gbc17371
                CGO_ENABLED:          1
                CGO_CFLAGS:
                CGO_CPPFLAGS:
                CGO_CXXFLAGS:
                CGO_LDFLAGS:
                GOARCH:               arm64
                GOOS:                 darwin
Docker Engine:
        Engine version:        20.10.12
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               aarch64
        OS kernel:             5.10.76-linuxkit
        OS CPU:                5
        OS memory:             7936 MB
        Security options:
                name=seccomp,profile=default
                name=cgroupns
```


### Command used with act

```sh
act -P self-hosted=catthehacker/ubuntu:act-latest --bind
```


### Describe issue

I have the following sample workflow

```
name: example

on: [ pull_request ]

jobs:
  diff:
    runs-on: [ self-hosted ]

    name: ArgoCD diff
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: test
        id: test
        run: |
          echo "fooBar=fooValue" >> $GITHUB_ENV

      - name: output
        run: |
          env

      - name: diff
        uses: ./
        with:
          someInput: ${{ env.fooBar }}}}
```

For the last action `someInput` is required. The previous step that dumps the `env` shows that `fooBar` is present. But the final step errors with `someInput` is a required input (I am doing input validation within that custom action). 

When running this in GitHub it works as expected, with the value of `env.fooBar` being passed to the action. 

### Link to GitHub repository

_No response_

### Workflow content

```yml
name: example

on: [ pull_request ]

jobs:
  diff:
    runs-on: [ self-hosted ]

    name: ArgoCD diff
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: test
        id: test
        run: |
          echo "fooBar=fooValue" >> $GITHUB_ENV

      - name: output
        run: |
          env

      - name: diff
        uses: ./
        with:
          someInput: ${{ env.fooBar }}}}
```


### Relevant log output

```sh
WARN  ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠
DEBU[0000] Loading environment from /Users/./code/misc/github-actions/.env
DEBU[0000] Loading secrets from /Users/./code/misc/github-actions/.secrets
DEBU[0000] Loading workflows from '/Users/./code/misc/github-actions/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'argocd-diff.yaml' in '/Users/./code/misc/github-actions/.github/workflows/argocd-diff.yaml'
DEBU[0000] Found workflow 'argocd-diff.yaml.bkp' in '/Users/./code/misc/github-actions/.github/workflows/argocd-diff.yaml.bkp'
DEBU[0000] Found workflow 'vault-secrets.yaml.bkp' in '/Users/./code/misc/github-actions/.github/workflows/vault-secrets.yaml.bkp'
DEBU[0000] Reading workflow '/Users/./code/misc/github-actions/.github/workflows/argocd-diff.yaml'
DEBU[0000] Preparing plan with all jobs
DEBU[0000] Using the only detected workflow event: pull_request
DEBU[0000] Planning jobs for event: pull_request
DEBU[0000] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
DEBU[0000] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression 'success()'
[argocd-diff/ArgoCD diff] [DEBUG] expression 'success()' evaluated to 'true'
[argocd-diff/ArgoCD diff] 🚀  Start image=catthehacker/ubuntu:act-latest
[argocd-diff/ArgoCD diff]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
[argocd-diff/ArgoCD diff] [DEBUG]   🐳  docker pull catthehacker/ubuntu:act-latest
[argocd-diff/ArgoCD diff] [DEBUG] Image exists? true
[argocd-diff/ArgoCD diff] [DEBUG] Removed container: 70c1c37f67904f347c07775988d4e2fedbd73578e78c78963d09be916c2b504c
[argocd-diff/ArgoCD diff] [DEBUG]   🐳  docker volume rm act-argocd-diff-ArgoCD-diff-env
[argocd-diff/ArgoCD diff]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[argocd-diff/ArgoCD diff] [DEBUG] Common container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:true OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=arm64 RUNNER_TEMP=/tmp] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:catthehacker/ubuntu:act-latest Volumes:map[] WorkingDir:/Users/./code/misc/github-actions Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
[argocd-diff/ArgoCD diff] [DEBUG] Common container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock /Users/./code/misc/github-actions:/Users/./code/misc/github-actions:delegated] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:host PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-toolcache Target:/toolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-argocd-diff-ArgoCD-diff-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
[argocd-diff/ArgoCD diff] [DEBUG] Created container name=act-argocd-diff-ArgoCD-diff id=7c7dfc7fd3b44baf727b8f8e57630bd7c936c4e4e993a515df92b359d3118255 from image catthehacker/ubuntu:act-latest (platform: )
[argocd-diff/ArgoCD diff] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=arm64 RUNNER_TEMP=/tmp]
[argocd-diff/ArgoCD diff]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[argocd-diff/ArgoCD diff] [DEBUG] Starting container: 7c7dfc7fd3b44baf727b8f8e57630bd7c936c4e4e993a515df92b359d3118255
[argocd-diff/ArgoCD diff] [DEBUG] Started container: 7c7dfc7fd3b44baf727b8f8e57630bd7c936c4e4e993a515df92b359d3118255
[argocd-diff/ArgoCD diff] [DEBUG] Writing entry to tarball workflow/event.json len:2
[argocd-diff/ArgoCD diff] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
[argocd-diff/ArgoCD diff] [DEBUG] Writing entry to tarball workflow/paths.txt len:0
[argocd-diff/ArgoCD diff] [DEBUG] Extracting content to '/var/run/act/'
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Skipping local actions/checkout because workdir was already copied
[argocd-diff/ArgoCD diff] [DEBUG] skip pre step for 'checkout': no action model available
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Skipping local actions/checkout because workdir was already copied
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF:v3 GITHUB_ACTION_REPOSITORY:actions/checkout GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:ArgoCD diff GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/pull/%!f(<nil>)/merge GITHUB_REF_NAME: GITHUB_REF_TYPE: GITHUB_REPOSITORY:dat-freight-and-analytics/github-actions GITHUB_REPOSITORY_OWNER:dat-freight-and-analytics GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:f9c68e502bac74f73ec7b2f7f986638f3eb1b19e GITHUB_TOKEN: GITHUB_WORKFLOW:argocd-diff GITHUB_WORKSPACE:/Users/./code/misc/github-actions IMAGE_OS:ubuntu20 INPUT_FETCH-DEPTH:0 ImageOS:selfhosted LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/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]
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression ''
[argocd-diff/ArgoCD diff] [DEBUG] expression '' evaluated to 'true'
[argocd-diff/ArgoCD diff] ⭐ Run Main checkout
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Skipping local actions/checkout because you bound your workspace
[argocd-diff/ArgoCD diff]   ✅  Success - Main checkout
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:test GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:ArgoCD diff GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/pull/%!f(<nil>)/merge GITHUB_REF_NAME: GITHUB_REF_TYPE: GITHUB_REPOSITORY:dat-freight-and-analytics/github-actions GITHUB_REPOSITORY_OWNER:dat-freight-and-analytics GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:f9c68e502bac74f73ec7b2f7f986638f3eb1b19e GITHUB_TOKEN: GITHUB_WORKFLOW:argocd-diff GITHUB_WORKSPACE:/Users/./code/misc/github-actions IMAGE_OS:ubuntu20 ImageOS:selfhosted LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/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 ]
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression ''
[argocd-diff/ArgoCD diff] [DEBUG] expression '' evaluated to 'true'
[argocd-diff/ArgoCD diff] ⭐ Run Main test
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Wrote command

echo "fooBar=value" >> $GITHUB_ENV


 to 'workflow/test'
[argocd-diff/ArgoCD diff] [DEBUG] Writing entry to tarball workflow/test len:37
[argocd-diff/ArgoCD diff] [DEBUG] Extracting content to '/var/run/act'
[argocd-diff/ArgoCD diff]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/test] user= workdir=
[argocd-diff/ArgoCD diff] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/test]'
[argocd-diff/ArgoCD diff] [DEBUG] Working directory '/Users/./code/misc/github-actions'
[argocd-diff/ArgoCD diff]   ✅  Success - Main test
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:2 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:ArgoCD diff GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/pull/%!f(<nil>)/merge GITHUB_REF_NAME: GITHUB_REF_TYPE: GITHUB_REPOSITORY:dat-freight-and-analytics/github-actions GITHUB_REPOSITORY_OWNER:dat-freight-and-analytics GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:f9c68e502bac74f73ec7b2f7f986638f3eb1b19e GITHUB_TOKEN: GITHUB_WORKFLOW:argocd-diff GITHUB_WORKSPACE:/Users/./code/misc/github-actions IMAGE_OS:ubuntu20 ImageOS:selfhosted LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/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  fooBar:value]
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression ''
[argocd-diff/ArgoCD diff] [DEBUG] expression '' evaluated to 'true'
[argocd-diff/ArgoCD diff] ⭐ Run Main output
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Wrote command

env


 to 'workflow/2'
[argocd-diff/ArgoCD diff] [DEBUG] Writing entry to tarball workflow/2 len:6
[argocd-diff/ArgoCD diff] [DEBUG] Extracting content to '/var/run/act'
[argocd-diff/ArgoCD diff]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
[argocd-diff/ArgoCD diff] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2]'
[argocd-diff/ArgoCD diff] [DEBUG] Working directory '/Users/./code/misc/github-actions'
| GITHUB_WORKSPACE=/Users/./code/misc/github-actions
| HOSTNAME=docker-desktop
| GITHUB_PATH=/var/run/act/workflow/paths.txt
| GITHUB_ACTION=2
| LSB_OS_VERSION=2004
| GITHUB_RUN_NUMBER=1
| LSB_RELEASE=20.04
| IMAGE_OS=ubuntu20
| GITHUB_REF_TYPE=
| PWD=/Users/./code/misc/github-actions
| DEPLOYMENT_BASEPATH=/opt/runner
| GITHUB_ACTIONS=true
| GITHUB_SHA=f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
| GITHUB_REF=refs/pull/%!f(<nil>)/merge
| ACT=true
| RUNNER_OS=Linux
| HOME=/root
| GITHUB_API_URL=https://api.github.com
| GITHUB_TOKEN=
| RUNNER_TRACKING_ID=
| RUNNER_ARCH=arm64
| RUNNER_TEMP=/tmp
| GITHUB_ENV=/var/run/act/workflow/envs.txt
| GITHUB_EVENT_PATH=/var/run/act/workflow/event.json
| GITHUB_EVENT_NAME=pull_request
| GITHUB_RUN_ID=1
| GITHUB_ACTOR=nektos/act
| GITHUB_GRAPHQL_URL=https://api.github.com/graphql
| TERM=xterm
| RUNNER_USER=root
| USER=root
| RUN_TOOL_CACHE=/opt/hostedtoolcache
| GITHUB_ACTION_PATH=
| GITHUB_SERVER_URL=https://github.com
| SHLVL=1
| RUNNER_TOOL_CACHE=/opt/hostedtoolcache
| GITHUB_REF_NAME=
| GITHUB_JOB=ArgoCD diff
| GITHUB_REPOSITORY=dat-freight-and-analytics/github-actions
|
| GITHUB_RETENTION_DAYS=0
| GITHUB_ACTION_REPOSITORY=
| fooBar=value
| PATH=/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
| RUNNER_PERFLOG=/dev/null
| GITHUB_BASE_REF=
| CI=true
| ImageOS=selfhosted
| GITHUB_REPOSITORY_OWNER=dat-freight-and-analytics
| GITHUB_HEAD_REF=
| GITHUB_ACTION_REF=
| GITHUB_WORKFLOW=argocd-diff
| DEBIAN_FRONTEND=noninteractive
| AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
| _=/usr/bin/env
[argocd-diff/ArgoCD diff]   ✅  Success - Main output
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] expression '${{ env.fooBar }}' rewritten to 'format('{0}', env.fooBar)'
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression 'format('{0}', env.fooBar)'
[argocd-diff/ArgoCD diff] [DEBUG] expression 'format('{0}', env.fooBar)' evaluated to '%!t(string=)'
[argocd-diff/ArgoCD diff] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:3 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:ArgoCD diff GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/pull/%!f(<nil>)/merge GITHUB_REF_NAME: GITHUB_REF_TYPE: GITHUB_REPOSITORY:dat-freight-and-analytics/github-actions GITHUB_REPOSITORY_OWNER:dat-freight-and-analytics GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:f9c68e502bac74f73ec7b2f7f986638f3eb1b19e GITHUB_TOKEN: GITHUB_WORKFLOW:argocd-diff GITHUB_WORKSPACE:/Users/./code/misc/github-actions IMAGE_OS:ubuntu20 INPUT_SOMEINPPUT: ImageOS:selfhosted LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/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 fooBar:value]
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression ''
[argocd-diff/ArgoCD diff] [DEBUG] expression '' evaluated to 'true'
[argocd-diff/ArgoCD diff] ⭐ Run Main diff
[argocd-diff/ArgoCD diff] [DEBUG] Read action &{ArgoCD diff application  Diff current application state against modifications made in source git repository. map[someInput:{Directory, relative to repository root, where gitops configuration is stored. true }] map[] {composite map[]   always()  always()   [] [{ {0 0    <nil> []    0 0} validate inputs  # validate all required inputs
[[ "${{ inputs.someInput }}" ]] || { echo "someInput is required"; exit 1; }
  bash {0 0    <nil> []    0 0} map[]  }]} { }} from 'Unknown'
[argocd-diff/ArgoCD diff] [DEBUG] About to run action &{ArgoCD diff application  Diff current application state against modifications made in source git repository. map[someInput:{Directory, relative to repository root, where gitops configuration is stored. true }] map[] {composite map[]   always()  always()   [] [{ {0 0    <nil> []    0 0} validate inputs  # validate all required inputs
[[ "${{ inputs.someInput }}" ]] || { echo "someInput is required"; exit 1; }
  bash {0 0    <nil> []    0 0} map[]  }]} { }}
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] type=local-action actionDir=/Users/./code/misc/github-actions actionPath= workdir=/Users/./code/misc/github-actions actionCacheDir=/Users/./.cache/act actionName=./ containerActionDir=/Users/./code/misc/github-actions/
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH:/Users/./code/misc/github-actions/ GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:ArgoCD diff GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/pull/%!f(<nil>)/merge GITHUB_REF_NAME: GITHUB_REF_TYPE: GITHUB_REPOSITORY:dat-freight-and-analytics/github-actions GITHUB_REPOSITORY_OWNER:dat-freight-and-analytics GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:f9c68e502bac74f73ec7b2f7f986638f3eb1b19e GITHUB_TOKEN: GITHUB_WORKFLOW:argocd-diff GITHUB_WORKSPACE:/Users/./code/misc/github-actions IMAGE_OS:ubuntu20 INPUT_SOMEINPUT: ImageOS:selfhosted LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/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 fooBar:value]
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression ''
[argocd-diff/ArgoCD diff] [DEBUG] expression '' evaluated to 'true'
[argocd-diff/ArgoCD diff] ⭐ Run Main validate inputs
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] expression '# validate all required inputs
[[ "${{ inputs.someInput }}" ]] || { echo "someInput is required"; exit 1; }
' rewritten to 'format('# validate all required inputs
[[ "{0}" ]] || {{ echo "someInput is required"; exit 1; }}
', inputs.someInput)'
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression 'format('# validate all required inputs
[[ "{0}" ]] || {{ echo "someInput is required"; exit 1; }}
', inputs.someInput)'
[argocd-diff/ArgoCD diff] [DEBUG] expression 'format('# validate all required inputs
[[ "{0}" ]] || {{ echo "someInput is required"; exit 1; }}
', inputs.someInput)' evaluated to '%!t(string=# validate all required inputs
[[ "" ]] || { echo "someInput is required"; exit 1; }
)'
[argocd-diff/ArgoCD diff] [DEBUG] Wrote command

# validate all required inputs
[[ "" ]] || { echo "someInput is required"; exit 1; }


 to 'workflow/3-composite-0.sh'
[argocd-diff/ArgoCD diff] [DEBUG] Writing entry to tarball workflow/3-composite-0.sh len:87
[argocd-diff/ArgoCD diff] [DEBUG] Extracting content to '/var/run/act'
[argocd-diff/ArgoCD diff]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3-composite-0.sh] user= workdir=
[argocd-diff/ArgoCD diff] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3-composite-0.sh]'
[argocd-diff/ArgoCD diff] [DEBUG] Working directory '/Users/./code/misc/github-actions'
| someInput is required
[argocd-diff/ArgoCD diff]   ❌  Failure - Main validate inputs
[argocd-diff/ArgoCD diff] exitcode '1': failure
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff]   ❌  Failure - Main diff
[argocd-diff/ArgoCD diff] exitcode '1': failure
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] expression '${{ env.fooBar }}' rewritten to 'format('{0}', env.fooBar)'
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression 'format('{0}', env.fooBar)'
[argocd-diff/ArgoCD diff] [DEBUG] expression 'format('{0}', env.fooBar)' evaluated to '%!t(string=)'
[argocd-diff/ArgoCD diff] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:post-3 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:pull_request GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:ArgoCD diff GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/pull/%!f(<nil>)/merge GITHUB_REF_NAME: GITHUB_REF_TYPE: GITHUB_REPOSITORY:dat-freight-and-analytics/github-actions GITHUB_REPOSITORY_OWNER:dat-freight-and-analytics GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:f9c68e502bac74f73ec7b2f7f986638f3eb1b19e GITHUB_TOKEN: GITHUB_WORKFLOW:argocd-diff GITHUB_WORKSPACE:/Users/./code/misc/github-actions IMAGE_OS:ubuntu20 INPUT_SOMEINPPUT: INPUT_SOMEINPUT: ImageOS:selfhosted LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.18.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/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 fooBar:value]
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
[argocd-diff/ArgoCD diff] [DEBUG] evaluating expression 'always()'
[argocd-diff/ArgoCD diff] [DEBUG] expression 'always()' evaluated to 'true'
[argocd-diff/ArgoCD diff] ⭐ Run Post diff
[argocd-diff/ArgoCD diff] [DEBUG] run post step for 'diff'
[argocd-diff/ArgoCD diff]   ✅  Success - Post diff
[argocd-diff/ArgoCD diff] [DEBUG] skipping post step for 'checkout': no action model available
[argocd-diff/ArgoCD diff] 🏁  Job failed
[argocd-diff/ArgoCD diff] [DEBUG] Loading slug from git directory '/Users/./code/misc/github-actions/.git'
[argocd-diff/ArgoCD diff] [DEBUG] Found revision: f9c68e502bac74f73ec7b2f7f986638f3eb1b19e
Error: Job 'ArgoCD diff' failed
```


### Additional information

_No response_


Discussion / hints:
Appears this applies for outputs as well. So I tried to work around this by doing something like the following:

```
name: example

on: [ pull_request ]

jobs:
  diff:
    runs-on: [ self-hosted ]

    name: ArgoCD diff
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: test
        id: test
        run: |
          echo "fooBar=fooValue" >> $GITHUB_ENV

      - name: output
        id: test
        run: |
          env
          echo "::set-output name=fooBar::fooValue"

      - name: diff
        uses: ./
        with:
          someInput: ${{ steps.test.outputs.fooBar }}}}
```

But get same thing. The input is required and validation fails due to it being an empty string. 
Being looking into the code and I think I found the issue. Expression evaluation uses the runContext environment.

```
/ GetEnv returns the env for the context
func (rc *RunContext) GetEnv() map[string]string {
	if rc.Env == nil {
		rc.Env = mergeMaps(rc.Run.Workflow.Env, rc.Run.Job().Environment(), rc.Config.Env)
	}
	rc.Env["ACT"] = "true"
	return rc.Env
}
``` 

So as you can see it only includes the environment for the workflow, job and config. When modifying the code to loop over the rc.Env it only includes a few environment variables at the stage of evaluation. 
Please add your action.yml as well here.
I've did some changes lately. I'll have a look then.

@KnisterPeter for the purposes of debugging I have a very simple `action.yml`

```
name: 'Test'
description: 'Testing'
inputs:
  someInput:
    description: "Some input"
    required: true
runs:
  using: "composite"
  steps:
    - name: validate inputs
      id: inputs
      run: |
        [[ "${{ inputs.someInput }}" ]] || { echo "someInput is required"; exit 1; }
      shell: bash
    - run: env
      shell: bash
```
@cyrus-mc consider rotating your aws secrets
Those were temporary. Long since expired. Or should have. 
I'm looking into this issue right now.
I already fixed using the step env vars in the with block, see pr attached to this issue.

_Since my big PR has been merged I try iron out critical bugs_

Fix patch:
diff --git a/pkg/runner/action.go b/pkg/runner/action.go
index 01e56f1bd5a..1da769597a4 100644
--- a/pkg/runner/action.go
+++ b/pkg/runner/action.go
@@ -154,7 +154,7 @@ func runActionImpl(step actionStep, actionDir string, remoteAction *remoteAction
 			containerArgs := []string{"node", path.Join(containerActionDir, action.Runs.Main)}
 			logger.Debugf("executing remote job container: %s", containerArgs)
 
-			rc.ApplyExtraPath(step.getEnv())
+			rc.ApplyExtraPath(ctx, step.getEnv())
 
 			return rc.execJobContainer(containerArgs, *step.getEnv(), "", "")(ctx)
 		case model.ActionRunsUsingDocker:
@@ -491,7 +491,7 @@ func runPreStep(step actionStep) common.Executor {
 			containerArgs := []string{"node", path.Join(containerActionDir, action.Runs.Pre)}
 			logger.Debugf("executing remote job container: %s", containerArgs)
 
-			rc.ApplyExtraPath(step.getEnv())
+			rc.ApplyExtraPath(ctx, step.getEnv())
 
 			return rc.execJobContainer(containerArgs, *step.getEnv(), "", "")(ctx)
 
@@ -580,7 +580,7 @@ func runPostStep(step actionStep) common.Executor {
 			containerArgs := []string{"node", path.Join(containerActionDir, action.Runs.Post)}
 			logger.Debugf("executing remote job container: %s", containerArgs)
 
-			rc.ApplyExtraPath(step.getEnv())
+			rc.ApplyExtraPath(ctx, step.getEnv())
 
 			return rc.execJobContainer(containerArgs, *step.getEnv(), "", "")(ctx)
 
diff --git a/pkg/runner/action_composite.go b/pkg/runner/action_composite.go
index c1e94fcd2cd..0b6fbe55272 100644
--- a/pkg/runner/action_composite.go
+++ b/pkg/runner/action_composite.go
@@ -66,6 +66,7 @@ func newCompositeRunContext(ctx context.Context, parent *RunContext, step action
 		JobContainer: parent.JobContainer,
 		ActionPath:   actionPath,
 		Env:          env,
+		GlobalEnv:    parent.GlobalEnv,
 		Masks:        parent.Masks,
 		ExtraPath:    parent.ExtraPath,
 		Parent:       parent,
@@ -99,6 +100,14 @@ func execAsComposite(step actionStep) common.Executor {
 
 		rc.Masks = append(rc.Masks, compositeRC.Masks...)
 		rc.ExtraPath = compositeRC.ExtraPath
+		// compositeRC.Env is dirty, contains INPUT_ and merged step env, only rely on compositeRC.GlobalEnv
+		for k, v := range compositeRC.GlobalEnv {
+			rc.Env[k] = v
+			if rc.GlobalEnv == nil {
+				rc.GlobalEnv = map[string]string{}
+			}
+			rc.GlobalEnv[k] = v
+		}
 
 		return err
 	}
diff --git a/pkg/runner/command.go b/pkg/runner/command.go
index 53e167cd921..f14eb7aad5c 100644
--- a/pkg/runner/command.go
+++ b/pkg/runner/command.go
@@ -82,11 +82,17 @@ func (rc *RunContext) commandHandler(ctx context.Context) common.LineHandler {
 }
 
 func (rc *RunContext) setEnv(ctx context.Context, kvPairs map[string]string, arg string) {
-	common.Logger(ctx).Infof("  \U00002699  ::set-env:: %s=%s", kvPairs["name"], arg)
+	name := kvPairs["name"]
+	common.Logger(ctx).Infof("  \U00002699  ::set-env:: %s=%s", name, arg)
 	if rc.Env == nil {
 		rc.Env = make(map[string]string)
 	}
-	rc.Env[kvPairs["name"]] = arg
+	rc.Env[name] = arg
+	// for composite action GITHUB_ENV and set-env passing
+	if rc.GlobalEnv == nil {
+		rc.GlobalEnv = map[string]string{}
+	}
+	rc.GlobalEnv[name] = arg
 }
 func (rc *RunContext) setOutput(ctx context.Context, kvPairs map[string]string, arg string) {
 	logger := common.Logger(ctx)
diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go
index 501eb71e01a..bfd090ce9ce 100644
--- a/pkg/runner/run_context.go
+++ b/pkg/runner/run_context.go
@@ -35,6 +35,7 @@ type RunContext struct {
 	Run                 *model.Run
 	EventJSON           string
 	Env                 map[string]string
+	GlobalEnv           map[string]string // to pass env changes of GITHUB_ENV and set-env correctly, due to dirty Env field
 	ExtraPath           []string
 	CurrentStep         string
 	StepResults         map[string]*model.StepResult
@@ -275,8 +276,6 @@ func (rc *RunContext) startJobContainer() common.Executor {
 			rc.stopJobContainer(),
 			rc.JobContainer.Create(rc.Config.ContainerCapAdd, rc.Config.ContainerCapDrop),
 			rc.JobContainer.Start(false),
-			rc.JobContainer.UpdateFromImageEnv(&rc.Env),
-			rc.JobContainer.UpdateFromEnv("/etc/environment", &rc.Env),
 			rc.JobContainer.Copy(rc.JobContainer.GetActPath()+"/", &container.FileEntry{
 				Name: "workflow/event.json",
 				Mode: 0644,
@@ -296,11 +295,21 @@ func (rc *RunContext) execJobContainer(cmd []string, env map[string]string, user
 	}
 }
 
-func (rc *RunContext) ApplyExtraPath(env *map[string]string) {
+func (rc *RunContext) ApplyExtraPath(ctx context.Context, env *map[string]string) {
 	if rc.ExtraPath != nil && len(rc.ExtraPath) > 0 {
 		path := rc.JobContainer.GetPathVariableName()
 		if (*env)[path] == "" {
-			(*env)[path] = rc.JobContainer.DefaultPathVariable()
+			cenv := map[string]string{}
+			var cpath string
+			if err := rc.JobContainer.UpdateFromImageEnv(&cenv)(ctx); err == nil {
+				if p, ok := cenv[path]; ok {
+					cpath = p
+				}
+			}
+			if len(cpath) == 0 {
+				cpath = rc.JobContainer.DefaultPathVariable()
+			}
+			(*env)[path] = cpath
 		}
 		(*env)[path] = rc.JobContainer.JoinPathVariable(append(rc.ExtraPath, (*env)[path])...)
 	}
@@ -664,7 +673,6 @@ func nestedMapLookup(m map[string]interface{}, ks ...string) (rval interface{})
 
 func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubContext, env map[string]string) map[string]string {
 	env["CI"] = "true"
-	env["GITHUB_ENV"] = rc.JobContainer.GetActPath() + "/workflow/envs.txt"
 	env["GITHUB_WORKFLOW"] = github.Workflow
 	env["GITHUB_RUN_ID"] = github.RunID
 	env["GITHUB_RUN_NUMBER"] = github.RunNumber
diff --git a/pkg/runner/step.go b/pkg/runner/step.go
index 2e211a308c8..d66827a95b7 100644
--- a/pkg/runner/step.go
+++ b/pkg/runner/step.go
@@ -44,6 +44,18 @@ func (s stepStage) String() string {
 	return "Unknown"
 }
 
+func processRunnerEnvFileCommand(ctx context.Context, fileName string, rc *RunContext, setter func(context.Context, map[string]string, string)) error {
+	env := map[string]string{}
+	err := rc.JobContainer.UpdateFromEnv(path.Join(rc.JobContainer.GetActPath(), fileName), &env)(ctx)
+	if err != nil {
+		return err
+	}
+	for k, v := range env {
+		setter(ctx, map[string]string{"name": k}, v)
+	}
+	return nil
+}
+
 func runStepExecutor(step step, stage stepStage, executor common.Executor) common.Executor {
 	return func(ctx context.Context) error {
 		logger := common.Logger(ctx)
@@ -92,9 +104,11 @@ func runStepExecutor(step step, stage stepStage, executor common.Executor) commo
 		outputFileCommand := path.Join("workflow", "outputcmd.txt")
 		stateFileCommand := path.Join("workflow", "statecmd.txt")
 		pathFileCommand := path.Join("workflow", "pathcmd.txt")
+		envFileCommand := path.Join("workflow", "envs.txt")
 		(*step.getEnv())["GITHUB_OUTPUT"] = path.Join(actPath, outputFileCommand)
 		(*step.getEnv())["GITHUB_STATE"] = path.Join(actPath, stateFileCommand)
 		(*step.getEnv())["GITHUB_PATH"] = path.Join(actPath, pathFileCommand)
+		(*step.getEnv())["GITHUB_ENV"] = path.Join(actPath, envFileCommand)
 		_ = rc.JobContainer.Copy(actPath, &container.FileEntry{
 			Name: outputFileCommand,
 			Mode: 0666,
@@ -104,6 +118,9 @@ func runStepExecutor(step step, stage stepStage, executor common.Executor) commo
 		}, &container.FileEntry{
 			Name: pathFileCommand,
 			Mode: 0666,
+		}, &container.FileEntry{
+			Name: envFileCommand,
+			Mode: 0666,
 		})(ctx)
 
 		err = executor(ctx)
@@ -131,21 +148,17 @@ func runStepExecutor(step step, stage stepStage, executor common.Executor) commo
 		}
 		// Process Runner File Commands
 		orgerr := err
-		state := map[string]string{}
-		err = rc.JobContainer.UpdateFromEnv(path.Join(actPath, stateFileCommand), &state)(ctx)
+		err = processRunnerEnvFileCommand(ctx, envFileCommand, rc, rc.setEnv)
 		if err != nil {
 			return err
 		}
-		for k, v := range state {
-			rc.saveState(ctx, map[string]string{"name": k}, v)
-		}
-		output := map[string]string{}
-		err = rc.JobContainer.UpdateFromEnv(path.Join(actPath, outputFileCommand), &output)(ctx)
+		err = processRunnerEnvFileCommand(ctx, stateFileCommand, rc, rc.saveState)
 		if err != nil {
 			return err
 		}
-		for k, v := range output {
-			rc.setOutput(ctx, map[string]string{"name": k}, v)
+		err = processRunnerEnvFileCommand(ctx, outputFileCommand, rc, rc.setOutput)
+		if err != nil {
+			return err
 		}
 		err = rc.UpdateExtraPath(ctx, path.Join(actPath, pathFileCommand))
 		if err != nil {
@@ -162,14 +175,6 @@ func setupEnv(ctx context.Context, step step) error {
 	rc := step.getRunContext()
 
 	mergeEnv(ctx, step)
-	err := rc.JobContainer.UpdateFromImageEnv(step.getEnv())(ctx)
-	if err != nil {
-		return err
-	}
-	err = rc.JobContainer.UpdateFromEnv((*step.getEnv())["GITHUB_ENV"], step.getEnv())(ctx)
-	if err != nil {
-		return err
-	}
 	// merge step env last, since it should not be overwritten
 	mergeIntoMap(step.getEnv(), step.getStepModel().GetEnv())
 
diff --git a/pkg/runner/step_run.go b/pkg/runner/step_run.go
index 17db77af6ec..f833fc1a928 100644
--- a/pkg/runner/step_run.go
+++ b/pkg/runner/step_run.go
@@ -30,7 +30,7 @@ func (sr *stepRun) main() common.Executor {
 	return runStepExecutor(sr, stepStageMain, common.NewPipelineExecutor(
 		sr.setupShellCommandExecutor(),
 		func(ctx context.Context) error {
-			sr.getRunContext().ApplyExtraPath(&sr.env)
+			sr.getRunContext().ApplyExtraPath(ctx, &sr.env)
 			return sr.getRunContext().JobContainer.Exec(sr.cmd, sr.env, "", sr.Step.WorkingDirectory)(ctx)
 		},
 	))


Test patch:
diff --git a/pkg/runner/runner_test.go b/pkg/runner/runner_test.go
index 0b2f9399eb6..0a83537ebc0 100644
--- a/pkg/runner/runner_test.go
+++ b/pkg/runner/runner_test.go
@@ -168,7 +168,7 @@ func TestRunEvent(t *testing.T) {
 		{workdir, "container-hostname", "push", "", platforms, secrets},
 		{workdir, "remote-action-docker", "push", "", platforms, secrets},
 		{workdir, "remote-action-js", "push", "", platforms, secrets},
-		{workdir, "remote-action-js", "push", "", map[string]string{"ubuntu-latest": "catthehacker/ubuntu:runner-latest"}, secrets}, // Test if this works with non root container
+		{workdir, "remote-action-js-node-user", "push", "", platforms, secrets}, // Test if this works with non root container
 		{workdir, "matrix", "push", "", platforms, secrets},
 		{workdir, "matrix-include-exclude", "push", "", platforms, secrets},
 		{workdir, "matrix-exitcode", "push", "Job 'test' failed", platforms, secrets},
@@ -193,6 +193,8 @@ func TestRunEvent(t *testing.T) {
 		{workdir, "actions-environment-and-context-tests", "push", "", platforms, secrets},
 		{workdir, "uses-action-with-pre-and-post-step", "push", "", platforms, secrets},
 		{workdir, "evalenv", "push", "", platforms, secrets},
+		{workdir, "docker-action-custom-path", "push", "", platforms, secrets},
+		{workdir, "GITHUB_ENV-use-in-env-ctx", "push", "", platforms, secrets},
 		{workdir, "ensure-post-steps", "push", "Job 'second-post-step-should-fail' failed", platforms, secrets},
 		{workdir, "workflow_dispatch", "workflow_dispatch", "", platforms, secrets},
 		{workdir, "workflow_dispatch_no_inputs_mapping", "workflow_dispatch", "", platforms, secrets},
@@ -204,6 +206,8 @@ func TestRunEvent(t *testing.T) {
 		{"../model/testdata", "container-volumes", "push", "", platforms, secrets},
 		{workdir, "path-handling", "push", "", platforms, secrets},
 		{workdir, "do-not-leak-step-env-in-composite", "push", "", platforms, secrets},
+		{workdir, "set-env-step-env-override", "push", "", platforms, secrets},
+		{workdir, "set-env-new-env-file-per-step", "push", "", platforms, secrets},
 	}
 
 	for _, table := range tables {
@@ -304,6 +308,8 @@ func TestRunEventHostEnvironment(t *testing.T) {
 			{workdir, "nix-prepend-path", "push", "", platforms, secrets},
 			{workdir, "inputs-via-env-context", "push", "", platforms, secrets},
 			{workdir, "do-not-leak-step-env-in-composite", "push", "", platforms, secrets},
+			{workdir, "set-env-step-env-override", "push", "", platforms, secrets},
+			{workdir, "set-env-new-env-file-per-step", "push", "", platforms, secrets},
 		}...)
 	}
 
diff --git a/pkg/runner/step_action_local_test.go b/pkg/runner/step_action_local_test.go
index 023f701880d..5fe7f291613 100644
--- a/pkg/runner/step_action_local_test.go
+++ b/pkg/runner/step_action_local_test.go
@@ -69,7 +69,7 @@ func TestStepActionLocalTest(t *testing.T) {
 	salm.On("readAction", sal.Step, filepath.Clean("/tmp/path/to/action"), "", mock.Anything, mock.Anything).
 		Return(&model.Action{}, nil)
 
-	cm.On("UpdateFromImageEnv", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
+	cm.On("Copy", "/var/run/act", mock.AnythingOfType("[]*container.FileEntry")).Return(func(ctx context.Context) error {
 		return nil
 	})
 
@@ -77,10 +77,6 @@ func TestStepActionLocalTest(t *testing.T) {
 		return nil
 	})
 
-	cm.On("Copy", "/var/run/act", mock.AnythingOfType("[]*container.FileEntry")).Return(func(ctx context.Context) error {
-		return nil
-	})
-
 	cm.On("UpdateFromEnv", "/var/run/act/workflow/statecmd.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
 		return nil
 	})
@@ -197,7 +193,7 @@ func TestStepActionLocalPost(t *testing.T) {
 				env  bool
 				exec bool
 			}{
-				env:  true,
+				env:  false,
 				exec: false,
 			},
 		},
@@ -260,10 +256,6 @@ func TestStepActionLocalPost(t *testing.T) {
 			}
 			sal.RunContext.ExprEval = sal.RunContext.NewExpressionEvaluator(ctx)
 
-			if tt.mocks.env {
-				cm.On("UpdateFromImageEnv", &sal.env).Return(func(ctx context.Context) error { return nil })
-				cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", &sal.env).Return(func(ctx context.Context) error { return nil })
-			}
 			if tt.mocks.exec {
 				suffixMatcher := func(suffix string) interface{} {
 					return mock.MatchedBy(func(array []string) bool {
@@ -276,6 +268,10 @@ func TestStepActionLocalPost(t *testing.T) {
 					return nil
 				})
 
+				cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
+					return nil
+				})
+
 				cm.On("UpdateFromEnv", "/var/run/act/workflow/statecmd.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
 					return nil
 				})
diff --git a/pkg/runner/step_action_remote_test.go b/pkg/runner/step_action_remote_test.go
index a6653f7d5b9..23d65545eed 100644
--- a/pkg/runner/step_action_remote_test.go
+++ b/pkg/runner/step_action_remote_test.go
@@ -165,10 +165,6 @@ func TestStepActionRemote(t *testing.T) {
 				})
 			}
 
-			if tt.mocks.env {
-				cm.On("UpdateFromImageEnv", &sar.env).Return(func(ctx context.Context) error { return nil })
-				cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", &sar.env).Return(func(ctx context.Context) error { return nil })
-			}
 			if tt.mocks.read {
 				sarm.On("readAction", sar.Step, suffixMatcher("act/remote-action@v1"), "", mock.Anything, mock.Anything).Return(&model.Action{}, nil)
 			}
@@ -179,6 +175,10 @@ func TestStepActionRemote(t *testing.T) {
 					return nil
 				})
 
+				cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
+					return nil
+				})
+
 				cm.On("UpdateFromEnv", "/var/run/act/workflow/statecmd.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
 					return nil
 				})
@@ -579,10 +579,6 @@ func TestStepActionRemotePost(t *testing.T) {
 			}
 			sar.RunContext.ExprEval = sar.RunContext.NewExpressionEvaluator(ctx)
 
-			if tt.mocks.env {
-				cm.On("UpdateFromImageEnv", &sar.env).Return(func(ctx context.Context) error { return nil })
-				cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", &sar.env).Return(func(ctx context.Context) error { return nil })
-			}
 			if tt.mocks.exec {
 				cm.On("Exec", []string{"node", "/var/run/act/actions/remote-action@v1/post.js"}, sar.env, "", "").Return(func(ctx context.Context) error { return tt.err })
 
@@ -590,6 +586,10 @@ func TestStepActionRemotePost(t *testing.T) {
 					return nil
 				})
 
+				cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
+					return nil
+				})
+
 				cm.On("UpdateFromEnv", "/var/run/act/workflow/statecmd.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
 					return nil
 				})
diff --git a/pkg/runner/step_docker_test.go b/pkg/runner/step_docker_test.go
index c26ffd685a9..3d90ac34f9e 100644
--- a/pkg/runner/step_docker_test.go
+++ b/pkg/runner/step_docker_test.go
@@ -57,14 +57,6 @@ func TestStepDockerMain(t *testing.T) {
 	}
 	sd.RunContext.ExprEval = sd.RunContext.NewExpressionEvaluator(ctx)
 
-	cm.On("UpdateFromImageEnv", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
-		return nil
-	})
-
-	cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
-		return nil
-	})
-
 	cm.On("Pull", false).Return(func(ctx context.Context) error {
 		return nil
 	})
@@ -89,6 +81,10 @@ func TestStepDockerMain(t *testing.T) {
 		return nil
 	})
 
+	cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
+		return nil
+	})
+
 	cm.On("UpdateFromEnv", "/var/run/act/workflow/statecmd.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
 		return nil
 	})
diff --git a/pkg/runner/step_run_test.go b/pkg/runner/step_run_test.go
index 324ed5fcc8f..4ca2eb97456 100644
--- a/pkg/runner/step_run_test.go
+++ b/pkg/runner/step_run_test.go
@@ -55,7 +55,7 @@ func TestStepRun(t *testing.T) {
 		return nil
 	})
 
-	cm.On("UpdateFromImageEnv", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
+	cm.On("Copy", "/var/run/act", mock.AnythingOfType("[]*container.FileEntry")).Return(func(ctx context.Context) error {
 		return nil
 	})
 
@@ -63,10 +63,6 @@ func TestStepRun(t *testing.T) {
 		return nil
 	})
 
-	cm.On("Copy", "/var/run/act", mock.AnythingOfType("[]*container.FileEntry")).Return(func(ctx context.Context) error {
-		return nil
-	})
-
 	cm.On("UpdateFromEnv", "/var/run/act/workflow/statecmd.txt", mock.AnythingOfType("*map[string]string")).Return(func(ctx context.Context) error {
 		return nil
 	})
diff --git a/pkg/runner/step_test.go b/pkg/runner/step_test.go
index 8930cca3e7f..86e5acc4a26 100644
--- a/pkg/runner/step_test.go
+++ b/pkg/runner/step_test.go
@@ -148,9 +148,6 @@ func TestSetupEnv(t *testing.T) {
 	sm.On("getStepModel").Return(step)
 	sm.On("getEnv").Return(&env)
 
-	cm.On("UpdateFromImageEnv", &env).Return(func(ctx context.Context) error { return nil })
-	cm.On("UpdateFromEnv", "/var/run/act/workflow/envs.txt", &env).Return(func(ctx context.Context) error { return nil })
-
 	err := setupEnv(context.Background(), sm)
 	assert.Nil(t, err)
 
@@ -174,7 +171,6 @@ func TestSetupEnv(t *testing.T) {
 		"GITHUB_ACTION_REPOSITORY": "",
 		"GITHUB_API_URL":           "https:///api/v3",
 		"GITHUB_BASE_REF":          "",
-		"GITHUB_ENV":               "/var/run/act/workflow/envs.txt",
 		"GITHUB_EVENT_NAME":        "",
 		"GITHUB_EVENT_PATH":        "/var/run/act/workflow/event.json",
 		"GITHUB_GRAPHQL_URL":       "https:///api/graphql",
diff --git a/pkg/runner/testdata/GITHUB_ENV-use-in-env-ctx/push.yml b/pkg/runner/testdata/GITHUB_ENV-use-in-env-ctx/push.yml
new file mode 100644
index 00000000000..c7b75a02003
--- /dev/null
+++ b/pkg/runner/testdata/GITHUB_ENV-use-in-env-ctx/push.yml
@@ -0,0 +1,27 @@
+on: push
+jobs:
+  _:
+    runs-on: ubuntu-latest
+    env:
+      MYGLOBALENV3: myglobalval3
+    steps:
+    - run: |
+        echo MYGLOBALENV1=myglobalval1 > $GITHUB_ENV
+        echo "::set-env name=MYGLOBALENV2::myglobalval2"
+    - uses: nektos/act-test-actions/script@main
+      with:
+        main: |
+          env
+          [[ "$MYGLOBALENV1" = "${{ env.MYGLOBALENV1 }}" ]]
+          [[ "$MYGLOBALENV1" = "${{ env.MYGLOBALENV1ALIAS }}" ]]
+          [[ "$MYGLOBALENV1" = "$MYGLOBALENV1ALIAS" ]]
+          [[ "$MYGLOBALENV2" = "${{ env.MYGLOBALENV2 }}" ]]
+          [[ "$MYGLOBALENV2" = "${{ env.MYGLOBALENV2ALIAS }}" ]]
+          [[ "$MYGLOBALENV2" = "$MYGLOBALENV2ALIAS" ]]
+          [[ "$MYGLOBALENV3" = "${{ env.MYGLOBALENV3 }}" ]]
+          [[ "$MYGLOBALENV3" = "${{ env.MYGLOBALENV3ALIAS }}" ]]
+          [[ "$MYGLOBALENV3" = "$MYGLOBALENV3ALIAS" ]]
+      env:
+        MYGLOBALENV1ALIAS: ${{ env.MYGLOBALENV1 }}
+        MYGLOBALENV2ALIAS: ${{ env.MYGLOBALENV2 }}
+        MYGLOBALENV3ALIAS: ${{ env.MYGLOBALENV3 }}
\ No newline at end of file
diff --git a/pkg/runner/testdata/do-not-leak-step-env-in-composite/push.yml b/pkg/runner/testdata/do-not-leak-step-env-in-composite/push.yml
index df5aab7f177..1bebab0bf2f 100644
--- a/pkg/runner/testdata/do-not-leak-step-env-in-composite/push.yml
+++ b/pkg/runner/testdata/do-not-leak-step-env-in-composite/push.yml
@@ -8,6 +8,7 @@ jobs:
           using: composite
           steps:
           - run: exit 1
+            shell: bash
             if: env.LEAK_ENV != 'val'
       shell: cp {0} action.yml
     - uses: ./
diff --git a/pkg/runner/testdata/docker-action-custom-path/push.yml b/pkg/runner/testdata/docker-action-custom-path/push.yml
new file mode 100644
index 00000000000..37bbf417344
--- /dev/null
+++ b/pkg/runner/testdata/docker-action-custom-path/push.yml
@@ -0,0 +1,12 @@
+on: push
+jobs:
+  _:
+    runs-on: ubuntu-latest
+    steps:
+    - run: |
+        FROM ubuntu:latest
+        ENV PATH="/opt/texlive/texdir/bin/x86_64-linuxmusl:${PATH}"
+        ENV ORG_PATH="${PATH}"
+        ENTRYPOINT [ "bash", "-c", "echo \"PATH=$PATH\" && echo \"ORG_PATH=$ORG_PATH\" && [[ \"$PATH\" = \"$ORG_PATH\" ]]" ]
+      shell: mv {0} Dockerfile
+    - uses: ./
\ No newline at end of file
diff --git a/pkg/runner/testdata/remote-action-js-node-user/push.yml b/pkg/runner/testdata/remote-action-js-node-user/push.yml
new file mode 100644
index 00000000000..cede7b0a204
--- /dev/null
+++ b/pkg/runner/testdata/remote-action-js-node-user/push.yml
@@ -0,0 +1,15 @@
+name: remote-action-js
+on: push
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    container:
+      image: node:16-buster-slim
+      options: --user node
+    steps:
+    - uses: actions/hello-world-javascript-action@v1
+      with:
+        who-to-greet: 'Mona the Octocat'
+
+    - uses: cloudposse/actions/github/slash-command-dispatch@0.14.0
diff --git a/pkg/runner/testdata/set-env-new-env-file-per-step/push.yml b/pkg/runner/testdata/set-env-new-env-file-per-step/push.yml
new file mode 100644
index 00000000000..34f4bad9253
--- /dev/null
+++ b/pkg/runner/testdata/set-env-new-env-file-per-step/push.yml
@@ -0,0 +1,15 @@
+on: push
+jobs:
+  _:
+    runs-on: ubuntu-latest
+    env:
+      MY_ENV: test
+    steps:
+    - run: exit 1
+      if: env.MY_ENV != 'test'
+    - run: echo "MY_ENV=test2" > $GITHUB_ENV
+    - run: exit 1
+      if: env.MY_ENV != 'test2'
+    - run: echo "MY_ENV=returnedenv" > $GITHUB_ENV
+    - run: exit 1
+      if: env.MY_ENV != 'returnedenv'
\ No newline at end of file
diff --git a/pkg/runner/testdata/set-env-step-env-override/push.yml b/pkg/runner/testdata/set-env-step-env-override/push.yml
new file mode 100644
index 00000000000..f35ef8758cc
--- /dev/null
+++ b/pkg/runner/testdata/set-env-step-env-override/push.yml
@@ -0,0 +1,24 @@
+on: push
+jobs:
+  _:
+    runs-on: ubuntu-latest
+    env:
+      MY_ENV: test
+    steps:
+    - run: exit 1
+      if: env.MY_ENV != 'test'
+    - run: |
+        runs:
+          using: composite
+          steps:
+          - run: exit 1
+            shell: bash
+            if: env.MY_ENV != 'val'
+          - run: echo "MY_ENV=returnedenv" > $GITHUB_ENV
+            shell: bash
+      shell: cp {0} action.yml
+    - uses: ./
+      env:
+        MY_ENV: val
+    - run: exit 1
+      if: env.MY_ENV != 'returnedenv'
\ No newline at end of file