nektos / act

Run your GitHub Actions locally πŸš€

Home Page:https://nektosact.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected matrix include behaviour

jmount-boss opened this issue Β· comments

Bug report info

act version:            0.2.59
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/james/.config/act/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
Build info:
	Go version:            go1.20.13
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -s -w -X main.version=0.2.59 -X main.commit=b7a8145d09a7469e03c57e24230cbba109218faf -X main.date=2024-02-01T22:32:29Z -X main.builtBy=goreleaser
		CGO_ENABLED:          0
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
		vcs:                  git
		vcs.revision:         b7a8145d09a7469e03c57e24230cbba109218faf
		vcs.time:             2024-02-01T22:32:06Z
		vcs.modified:         false
Docker Engine:
	Engine version:        25.0.1
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Ubuntu 22.04.3 LTS
	OS type:               linux
	OS version:            22.04
	OS arch:               x86_64
	OS kernel:             6.1.0-1033-oem
	OS CPU:                12
	OS memory:             39770 MB
	Security options:
		name=apparmor
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

act -W '.github/workflows/build.yml'

Describe issue

The matrix configuration appears to be inconsistent with the documentation provided by Github here. Expected only 6 configurations, yet Act runs 7. The matrix configuration '{color: green}' should not exist according to the Github documentation.

Link to GitHub repository

No response

Workflow content

name: Build & Test

on:
  push:

# Global environment variables

jobs:
  build:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        fruit: [apple, pear]
        animal: [cat, dog]
        include:
          - color: green
          - color: pink
            animal: cat
          - fruit: apple
            shape: circle
          - fruit: banana
          - fruit: banana
            animal: cat

    steps: 
      - name: Matrix Configuration
        run: |
          echo "Color: ${{ matrix.color }}"

Relevant log output

[Build & Test/build-1] πŸš€  Start image=catthehacker/ubuntu:act-20.04
[Build & Test/build-2] πŸš€  Start image=catthehacker/ubuntu:act-20.04
[Build & Test/build-3] πŸš€  Start image=catthehacker/ubuntu:act-20.04
[Build & Test/build-4] πŸš€  Start image=catthehacker/ubuntu:act-20.04
INFO[0000] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-2]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
INFO[0000] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-4]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
INFO[0000] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-1]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
INFO[0000] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-3]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-3]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-4]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-2]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-1]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-3]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-4]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-2]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-1]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-2] πŸ§ͺ  Matrix: map[animal:dog fruit:apple shape:circle]
[Build & Test/build-3] πŸ§ͺ  Matrix: map[animal:cat color:pink fruit:pear]
[Build & Test/build-4] πŸ§ͺ  Matrix: map[animal:dog fruit:pear]
[Build & Test/build-3] ⭐ Run Main Matrix Configuration
[Build & Test/build-2] ⭐ Run Main Matrix Configuration
[Build & Test/build-1] πŸ§ͺ  Matrix: map[animal:cat color:pink fruit:apple shape:circle]
[Build & Test/build-4] ⭐ Run Main Matrix Configuration
[Build & Test/build-2]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[Build & Test/build-3]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[Build & Test/build-1] ⭐ Run Main Matrix Configuration
[Build & Test/build-4]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
| Object
[Build & Test/build-4]   βœ…  Success - Main Matrix Configuration
| Object
| Object
[Build & Test/build-2]   βœ…  Success - Main Matrix Configuration
[Build & Test/build-3]   βœ…  Success - Main Matrix Configuration
[Build & Test/build-4] Cleaning up container for job build
[Build & Test/build-1]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[Build & Test/build-2] Cleaning up container for job build
[Build & Test/build-3] Cleaning up container for job build
| Object
[Build & Test/build-1]   βœ…  Success - Main Matrix Configuration
[Build & Test/build-1] Cleaning up container for job build
[Build & Test/build-4] 🏁  Job succeeded
[Build & Test/build-2] 🏁  Job succeeded
[Build & Test/build-5] πŸš€  Start image=catthehacker/ubuntu:act-20.04
[Build & Test/build-6] πŸš€  Start image=catthehacker/ubuntu:act-20.04
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-6]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-5]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
[Build & Test/build-1] 🏁  Job succeeded
[Build & Test/build-7] πŸš€  Start image=catthehacker/ubuntu:act-20.04
INFO[0003] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-7]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=true
[Build & Test/build-3] 🏁  Job succeeded
INFO[0006] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-6]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
INFO[0006] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-7]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
INFO[0006] Parallel tasks (0) below minimum, setting to 1 
[Build & Test/build-5]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-6]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-7]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-5]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build & Test/build-6] πŸ§ͺ  Matrix: map[fruit:banana]
[Build & Test/build-7] πŸ§ͺ  Matrix: map[animal:cat fruit:banana]
[Build & Test/build-5] πŸ§ͺ  Matrix: map[color:green]
[Build & Test/build-6] ⭐ Run Main Matrix Configuration
[Build & Test/build-7] ⭐ Run Main Matrix Configuration
[Build & Test/build-5] ⭐ Run Main Matrix Configuration
[Build & Test/build-6]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[Build & Test/build-7]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[Build & Test/build-5]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
| Object
[Build & Test/build-6]   βœ…  Success - Main Matrix Configuration
| Object
| Object
[Build & Test/build-7]   βœ…  Success - Main Matrix Configuration
[Build & Test/build-5]   βœ…  Success - Main Matrix Configuration
[Build & Test/build-6] Cleaning up container for job build
[Build & Test/build-7] Cleaning up container for job build
[Build & Test/build-5] Cleaning up container for job build
[Build & Test/build-6] 🏁  Job succeeded
[Build & Test/build-7] 🏁  Job succeeded
[Build & Test/build-5] 🏁  Job succeeded

Additional information

No response