Repository: nektos/act (language: go)

Issue:
Act does not exit correctly when a job in a matrix fails
### Bug report info

```plain text
act version:            0.2.34-13-gbef9b5c
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/markusw/.actrc:
		-P ubuntu-latest=node:12-buster-slim
		-P ubuntu-20.04=node:12-buster-slim
		-P ubuntu-18.04=node:12-buster-slim
		-P ubuntu-16.04=node:12-stretch-slim
Build info:
	Go version:            go1.19.4
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-compiler:            gc
		-ldflags:             -X main.version=0.2.34-13-gbef9b5c
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
Docker Engine:
	Engine version:        20.10.21+dfsg1
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Debian GNU/Linux bookworm/sid
	OS type:               linux
	OS version:            
	OS arch:               x86_64
	OS kernel:             6.0.0-5-amd64
	OS CPU:                12
	OS memory:             31734 MB
	Security options:
		name=apparmor
		name=seccomp,profile=default
		name=cgroupns
```


### Command used with act

```sh
act -v
```


### Describe issue

When one job in a matrix of jobs fail, act might still exit with a zero exit code.
I would be expected to fail a job, if one job fails to succeed.


### Link to GitHub repository

_No response_

### Workflow content

```yml
name: test

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        val: ["true", "false"]
      fail-fast: false
    steps:
      - run: |
          echo hallo ${{ matrix.val }}
          if [[ "${{ matrix.val }}" = "false" ]] ; then
            exit 1
          fi
```


### Relevant log output

```sh
DEBU[0000] Loading environment from /tmp/act-test/.env  
DEBU[0000] Loading secrets from /tmp/act-test/.secrets  
DEBU[0000] Loading workflows from '/tmp/act-test/.github/workflows' 
DEBU[0000] Loading workflows recursively                
DEBU[0000] Found workflow 'ci.yml' in '/tmp/act-test/.github/workflows/ci.yml' 
DEBU[0000] Reading workflow '/tmp/act-test/.github/workflows/ci.yml' 
DEBU[0000] Preparing plan with all jobs                 
DEBU[0000] Using the only detected workflow event: push 
DEBU[0000] Planning jobs for event: push                
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] false                                        
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
[test/test-2] [DEBUG] evaluating expression 'success()'
[test/test-1] [DEBUG] evaluating expression 'success()'
[test/test-1] [DEBUG] expression 'success()' evaluated to 'true'
[test/test-2] [DEBUG] expression 'success()' evaluated to 'true'
[test/test-1] 🚀  Start image=node:12-buster-slim
[test/test-2] 🚀  Start image=node:12-buster-slim
[test/test-1]   🐳  docker pull image=node:12-buster-slim platform= username= forcePull=false
[test/test-1] [DEBUG]   🐳  docker pull node:12-buster-slim
[test/test-2]   🐳  docker pull image=node:12-buster-slim platform= username= forcePull=false
[test/test-2] [DEBUG]   🐳  docker pull node:12-buster-slim
[test/test-2] [DEBUG] Image exists? true
[test/test-1] [DEBUG] Image exists? true
[test/test-1]   🐳  docker create image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-1] [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=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:node:12-buster-slim Volumes:map[] WorkingDir:/tmp/act-test Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
[test/test-1] [DEBUG] Common container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock] 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-test-test-1-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-test-test-1 Target:/tmp/act-test ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
[test/test-1] [DEBUG] Created container name=act-test-test-1 id=ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a from image node:12-buster-slim (platform: )
[test/test-1] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]
[test/test-1]   🐳  docker run image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-1] [DEBUG] Starting container: ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a
[test/test-2] [DEBUG] Removed container: 7626864bb03a75d79afc6a8d2d5ed053ee7a4a9608bc2cf7aeaac9eda88457b2
[test/test-2] [DEBUG]   🐳  docker volume rm act-test-test-2
[test/test-2] [DEBUG]   🐳  docker volume rm act-test-test-2-env
[test/test-2]   🐳  docker create image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-2] [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=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:node:12-buster-slim Volumes:map[] WorkingDir:/tmp/act-test Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
[test/test-2] [DEBUG] Common container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock] 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-test-test-2-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-test-test-2 Target:/tmp/act-test ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-toolcache Target:/toolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
[test/test-2] [DEBUG] Created container name=act-test-test-2 id=8273ba9f984c8b3b765a3c09c28532b7edfb05e57ce453ab41247d82c1b6bba2 from image node:12-buster-slim (platform: )
[test/test-2] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]
[test/test-2]   🐳  docker run image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-2] [DEBUG] Starting container: 8273ba9f984c8b3b765a3c09c28532b7edfb05e57ce453ab41247d82c1b6bba2
[test/test-1] [DEBUG] Started container: ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a
[test/test-2] [DEBUG] Started container: 8273ba9f984c8b3b765a3c09c28532b7edfb05e57ce453ab41247d82c1b6bba2
[test/test-1] [DEBUG] Writing entry to tarball workflow/event.json len:2
[test/test-1] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
[test/test-1] [DEBUG] Extracting content to '/var/run/act/'
[test/test-2] [DEBUG] Writing entry to tarball workflow/event.json len:2
[test/test-2] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
[test/test-2] [DEBUG] Extracting content to '/var/run/act/'
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] 🧪  Matrix: map[val:true]
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] 🧪  Matrix: map[val:false]
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] setupEnv => map[ACT:true CI:true GITHUB_ACTION:0 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:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:test GITHUB_REF:refs/heads/main GITHUB_REF_NAME:main GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:file:///tmp/ GITHUB_REPOSITORY_OWNER:file: GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3fbf608129ab7703b44a4d8d36ea432f9f5f46ce GITHUB_TOKEN: GITHUB_WORKFLOW:test GITHUB_WORKSPACE:/tmp/act-test ImageOS:ubuntu20 NODE_VERSION:12.22.12 PATH:/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: YARN_VERSION:1.22.18]
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] evaluating expression ''
[test/test-1] [DEBUG] expression '' evaluated to 'true'
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] ⭐ Run Main echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
[test/test-1] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0
[test/test-1] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0
[test/test-1] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0
[test/test-1] [DEBUG] Extracting content to '/var/run/act'
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] setupEnv => map[ACT:true CI:true GITHUB_ACTION:0 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:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:test GITHUB_REF:refs/heads/main GITHUB_REF_NAME:main GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:file:///tmp/ GITHUB_REPOSITORY_OWNER:file: GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3fbf608129ab7703b44a4d8d36ea432f9f5f46ce GITHUB_TOKEN: GITHUB_WORKFLOW:test GITHUB_WORKSPACE:/tmp/act-test ImageOS:ubuntu20 NODE_VERSION:12.22.12 PATH:/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: YARN_VERSION:1.22.18]
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] evaluating expression ''
[test/test-2] [DEBUG] expression '' evaluated to 'true'
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] ⭐ Run Main echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
[test/test-2] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0
[test/test-2] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0
[test/test-2] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0
[test/test-2] [DEBUG] Extracting content to '/var/run/act'
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] [DEBUG] Wrote command 

echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi


 to 'workflow/0'
[test/test-1] [DEBUG] Writing entry to tarball workflow/0 len:63
[test/test-1] [DEBUG] Extracting content to '/var/run/act'
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] [DEBUG] Wrote command 

echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi


 to 'workflow/0'
[test/test-2] [DEBUG] Writing entry to tarball workflow/0 len:65
[test/test-2] [DEBUG] Extracting content to '/var/run/act'
[test/test-1]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[test/test-1] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0]'
[test/test-1] [DEBUG] Working directory '/tmp/act-test'
[test/test-2]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[test/test-2] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0]'
[test/test-2] [DEBUG] Working directory '/tmp/act-test'
| hallo true
[test/test-1]   ✅  Success - Main echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
| hallo false
[test/test-2]   ❌  Failure - Main echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
[test/test-2] exitcode '1': failure
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] 🏁  Job failed
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] [DEBUG] Removed container: ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a
[test/test-1] [DEBUG]   🐳  docker volume rm act-test-test-1
[test/test-1] [DEBUG]   🐳  docker volume rm act-test-test-1-env
[test/test-1] 🏁  Job succeeded
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
```


### Additional information

_No response_


Discussion / hints:
_I want to add that continue-on-error is also not working for a job matrix. Here my test of my act clone, which fails in act_
```
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        test: [0,1,2]
    continue-on-error: true
    steps:
    - run: exit 1
  assert:
    needs:
    - test
    if: always() && ( needs.test.result != 'success' || !success() )
    runs-on: ubuntu-latest
    steps:
    - run: exit 1
```
`continue-on-error` on job level is not implemented at all. That would be a new feature and should not be part of this bug report.
But sure, you are right, it is a missing feature and not working currently.


Fix patch:
diff --git a/pkg/runner/job_executor.go b/pkg/runner/job_executor.go
index 4ae778791f6..88c227fe67c 100644
--- a/pkg/runner/job_executor.go
+++ b/pkg/runner/job_executor.go
@@ -130,17 +130,29 @@ func newJobExecutor(info jobInfo, sf stepFactory, rc *RunContext) common.Executo
 
 func setJobResult(ctx context.Context, info jobInfo, rc *RunContext, success bool) {
 	logger := common.Logger(ctx)
+
 	jobResult := "success"
-	jobResultMessage := "succeeded"
+	// we have only one result for a whole matrix build, so we need
+	// to keep an existing result state if we run a matrix
+	if len(info.matrix()) > 0 && rc.Run.Job().Result != "" {
+		jobResult = rc.Run.Job().Result
+	}
+
 	if !success {
 		jobResult = "failure"
-		jobResultMessage = "failed"
 	}
+
 	info.result(jobResult)
 	if rc.caller != nil {
 		// set reusable workflow job result
 		rc.caller.runContext.result(jobResult)
 	}
+
+	jobResultMessage := "succeeded"
+	if jobResult != "success" {
+		jobResultMessage = "failed"
+	}
+
 	logger.WithField("jobResult", jobResult).Infof("\U0001F3C1  Job %s", jobResultMessage)
 }
 


Test patch:
diff --git a/pkg/runner/runner_test.go b/pkg/runner/runner_test.go
index 5cf4837593b..ceae70c5af5 100644
--- a/pkg/runner/runner_test.go
+++ b/pkg/runner/runner_test.go
@@ -170,6 +170,7 @@ func TestRunEvent(t *testing.T) {
 		{workdir, "remote-action-js", "push", "", map[string]string{"ubuntu-latest": "catthehacker/ubuntu:runner-latest"}, 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},
 		{workdir, "commands", "push", "", platforms, secrets},
 		{workdir, "workdir", "push", "", platforms, secrets},
 		{workdir, "defaults-run", "push", "", platforms, secrets},
diff --git a/pkg/runner/testdata/matrix-exitcode/push.yml b/pkg/runner/testdata/matrix-exitcode/push.yml
new file mode 100644
index 00000000000..0f5d3352535
--- /dev/null
+++ b/pkg/runner/testdata/matrix-exitcode/push.yml
@@ -0,0 +1,16 @@
+name: test
+
+on: push
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        val: ["success", "failure"]
+      fail-fast: false
+    steps:
+      - name: test
+        run: |
+          echo "Expected job result: ${{ matrix.val }}"
+          [[ "${{ matrix.val }}" = "success" ]] || exit 1