[GH-ISSUE #909] Issue: matrix example works in github but not in act #540

Closed
opened 2026-03-01 21:44:17 +03:00 by kerem · 4 comments
Owner

Originally created by @nitrocode on GitHub (Dec 2, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/909

System information

  • Operating System: osx
  • Architecture: 64
  • Apple M1: no
  • Docker version: 20.10.8
  • Docker image used in act: Start image=catthehacker/ubuntu:act-latest
  • act version: act version 0.2.24

Expected behaviour

Run job1 and then run job2

Actual behaviour

Runs job1

Workflow and/or repository

This workflow is taken from this example https://docs.github.com/en/actions/learn-github-actions/expressions#example-returning-a-json-object

workflow
name: build
on: push
jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
      - id: set-matrix
        run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
  job2:
    needs: job1
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{fromJSON(needs.job1.outputs.matrix)}}
    steps:
      - run: build

Steps to reproduce

act -j job1
act -j job2

act output

Log
✗ act -j job2 --verbose
DEBU[0000] Loading environment from /Users/user/git/github/Crypto-Model/vygr-infra/.env
DEBU[0000] Loading secrets from /Users/user/git/github/Crypto-Model/vygr-infra/.secrets
DEBU[0000] Loading workflows from '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'docker-build-github-actions-runner.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build-github-actions-runner.yaml'
DEBU[0000] Found workflow 'docker-build.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build.yaml'
DEBU[0000] Found workflow 'example.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/example.yaml'
DEBU[0000] Found workflow 'labeler.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/labeler.yaml'
DEBU[0000] Found workflow 'pre-commit.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/pre-commit.yaml'
DEBU[0000] Found workflow 'test.json' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/test.json'
DEBU[0000] Found workflow 'test2.json' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/test2.json'
DEBU[0000] Found workflow 'validate-codeowners.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/validate-codeowners.yaml'
DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build-github-actions-runner.yaml'
DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build-github-actions-runner.yaml'
DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build.yaml'
DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build.yaml'
DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/example.yaml'
DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/example.yaml'
DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/labeler.yaml'
DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/labeler.yaml'
DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/pre-commit.yaml'
DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/pre-commit.yaml'
DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/validate-codeowners.yaml'
DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/validate-codeowners.yaml'
DEBU[0000] Planning job: job2
DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf'
DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org
DEBU[0000] context env => map[ACT:true]
DEBU[0000] context needs => map[]
[build/job1] 🚀  Start image=catthehacker/ubuntu:act-latest
DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf'
DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org
[build/job1]   🐳  docker pull catthehacker/ubuntu:act-latest
DEBU[0000] Image exists? true
[build/job1]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[build/job1] Created container name=act-build-job1 id=a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d from image catthehacker/ubuntu:act-latest (platform: )
[build/job1] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[build/job1]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[build/job1] Starting container: a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d
[build/job1] Started container: a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d
[build/job1]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root
[build/job1] Exec command '[mkdir -m 0777 -p /var/run/act]'
DEBU[0000] Writing entry to tarball workflow/event.json len:2
DEBU[0000] Writing entry to tarball workflow/envs.txt len:0
DEBU[0000] Writing entry to tarball workflow/paths.txt len:0
[build/job1] Extracting content to '/var/run/act/'
DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf'
DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org
DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf'
DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
DEBU[0000] context needs => map[]
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:set-matrix GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/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:job1 GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/VOYAGER-140-gha-matrix-gh-org GITHUB_REPOSITORY:Crypto-model/vygr-infra GITHUB_REPOSITORY_OWNER:Crypto-model GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3051e2500d74be9e80e2bda460a6e94726ff65bf GITHUB_TOKEN: GITHUB_WORKFLOW:build GITHUB_WORKSPACE:/Users/user/git/github/Crypto-Model/vygr-infra IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
[build/job1] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:set-matrix GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/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:job1 GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/VOYAGER-140-gha-matrix-gh-org GITHUB_REPOSITORY:Crypto-model/vygr-infra GITHUB_REPOSITORY_OWNER:Crypto-model GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3051e2500d74be9e80e2bda460a6e94726ff65bf GITHUB_TOKEN: GITHUB_WORKFLOW:build GITHUB_WORKSPACE:/Users/user/git/github/Crypto-Model/vygr-infra IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
[build/job1] ⭐  Run echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
DEBU[0000] Wrote command '
echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
' to 'workflow/set-matrix'
DEBU[0000] Writing entry to tarball workflow/set-matrix len:136
[build/job1] Extracting content to '/Users/user/git/github/Crypto-Model/vygr-infra'
[build/job1]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/user/git/github/Crypto-Model/vygr-infra/workflow/set-matrix] user=
[build/job1] Exec command '[bash --noprofile --norc -e -o pipefail /Users/user/git/github/Crypto-Model/vygr-infra/workflow/set-matrix]'
[build/job1]   ⚙  ::set-output:: matrix={"include":[{"project":"foo","config":"Debug"},{"project":"bar","config":"Release"}]}
DEBU[0001] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0001] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0001] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git'
DEBU[0001] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf
DEBU[0001] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf'
DEBU[0001] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org
DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
DEBU[0001] context needs => map[]
DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:set-matrix GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/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:job1 GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/VOYAGER-140-gha-matrix-gh-org GITHUB_REPOSITORY:Crypto-model/vygr-infra GITHUB_REPOSITORY_OWNER:Crypto-model GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3051e2500d74be9e80e2bda460a6e94726ff65bf GITHUB_TOKEN: GITHUB_WORKFLOW:build GITHUB_WORKSPACE:/Users/user/git/github/Crypto-Model/vygr-infra IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
DEBU[0001] Evaluating 'steps['set-matrix']['outputs']['matrix']' instead of 'steps.set-matrix.outputs.matrix'
[build/job1]   ✅  Success - echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
[build/job1] Removed container: a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d
[build/job1]   🐳  docker volume rm act-build-job1
Originally created by @nitrocode on GitHub (Dec 2, 2021). Original GitHub issue: https://github.com/nektos/act/issues/909 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information <!-- - Operating System: < Windows | Linux | macOS | etc... > - Architecture: < x64 (64-bit) | x86 (32-bit) | arm64 (64-bit) | arm (32-bit) | etc... > - Apple M1: < yes | no > - Docker version: < output of `docker system info -f "{{.ServerVersion}}"` > - Docker image used in `act`: < can be omitted if it's included in log > - `act` version: < output of `act --version`, if you've built `act` yourself, please provide commit hash > --> - Operating System: osx - Architecture: 64 - Apple M1: no - Docker version: 20.10.8 - Docker image used in `act`: Start image=catthehacker/ubuntu:act-latest - `act` version: act version 0.2.24 ## Expected behaviour Run job1 and then run job2 ## Actual behaviour <!-- - Describe the issue --> Runs job1 ## Workflow and/or repository <!-- - Provide workflow with which we can reproduce the issue OR - Provide link to your GitHub repository that contains the workflow --> This workflow is taken from this example https://docs.github.com/en/actions/learn-github-actions/expressions#example-returning-a-json-object <details> <summary>workflow</summary> ```yaml name: build on: push jobs: job1: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - id: set-matrix run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" job2: needs: job1 runs-on: ubuntu-latest strategy: matrix: ${{fromJSON(needs.job1.outputs.matrix)}} steps: - run: build ``` </details> ## Steps to reproduce <!-- - Make sure to include full command with parameters you used to run `act`, example: 1. Clone example repo (https://github.com/cplee/github-actions-demo) 2. Enter cloned repo directory 3. Run `act -s SUPER_SECRET=im-a-value` --> ``` act -j job1 act -j job2 ``` ## `act` output <!-- - Use `act` with `-v`/`--verbose` and paste output from your terminal in code block below --> <details> <summary>Log</summary> ```none ✗ act -j job2 --verbose DEBU[0000] Loading environment from /Users/user/git/github/Crypto-Model/vygr-infra/.env DEBU[0000] Loading secrets from /Users/user/git/github/Crypto-Model/vygr-infra/.secrets DEBU[0000] Loading workflows from '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows' DEBU[0000] Loading workflows recursively DEBU[0000] Found workflow 'docker-build-github-actions-runner.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build-github-actions-runner.yaml' DEBU[0000] Found workflow 'docker-build.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build.yaml' DEBU[0000] Found workflow 'example.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/example.yaml' DEBU[0000] Found workflow 'labeler.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/labeler.yaml' DEBU[0000] Found workflow 'pre-commit.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/pre-commit.yaml' DEBU[0000] Found workflow 'test.json' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/test.json' DEBU[0000] Found workflow 'test2.json' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/test2.json' DEBU[0000] Found workflow 'validate-codeowners.yaml' in '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/validate-codeowners.yaml' DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build-github-actions-runner.yaml' DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build-github-actions-runner.yaml' DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build.yaml' DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/docker-build.yaml' DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/example.yaml' DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/example.yaml' DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/labeler.yaml' DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/labeler.yaml' DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/pre-commit.yaml' DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/pre-commit.yaml' DEBU[0000] Reading workflow '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/validate-codeowners.yaml' DEBU[0000] Correcting if statements '/Users/user/git/github/Crypto-Model/vygr-infra/.github/workflows/validate-codeowners.yaml' DEBU[0000] Planning job: job2 DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf' DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org DEBU[0000] context env => map[ACT:true] DEBU[0000] context needs => map[] [build/job1] 🚀 Start image=catthehacker/ubuntu:act-latest DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf' DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org [build/job1] 🐳 docker pull catthehacker/ubuntu:act-latest DEBU[0000] Image exists? true [build/job1] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [build/job1] Created container name=act-build-job1 id=a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d from image catthehacker/ubuntu:act-latest (platform: ) [build/job1] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp] [build/job1] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [build/job1] Starting container: a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d [build/job1] Started container: a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d [build/job1] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root [build/job1] Exec command '[mkdir -m 0777 -p /var/run/act]' DEBU[0000] Writing entry to tarball workflow/event.json len:2 DEBU[0000] Writing entry to tarball workflow/envs.txt len:0 DEBU[0000] Writing entry to tarball workflow/paths.txt len:0 [build/job1] Extracting content to '/var/run/act/' DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf' DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org DEBU[0000] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0000] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0000] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf' DEBU[0000] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] DEBU[0000] context needs => map[] DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:set-matrix GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/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:job1 GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/VOYAGER-140-gha-matrix-gh-org GITHUB_REPOSITORY:Crypto-model/vygr-infra GITHUB_REPOSITORY_OWNER:Crypto-model GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3051e2500d74be9e80e2bda460a6e94726ff65bf GITHUB_TOKEN: GITHUB_WORKFLOW:build GITHUB_WORKSPACE:/Users/user/git/github/Crypto-Model/vygr-infra IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [build/job1] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:set-matrix GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/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:job1 GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/VOYAGER-140-gha-matrix-gh-org GITHUB_REPOSITORY:Crypto-model/vygr-infra GITHUB_REPOSITORY_OWNER:Crypto-model GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3051e2500d74be9e80e2bda460a6e94726ff65bf GITHUB_TOKEN: GITHUB_WORKFLOW:build GITHUB_WORKSPACE:/Users/user/git/github/Crypto-Model/vygr-infra IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] [build/job1] ⭐ Run echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" DEBU[0000] Wrote command ' echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" ' to 'workflow/set-matrix' DEBU[0000] Writing entry to tarball workflow/set-matrix len:136 [build/job1] Extracting content to '/Users/user/git/github/Crypto-Model/vygr-infra' [build/job1] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/user/git/github/Crypto-Model/vygr-infra/workflow/set-matrix] user= [build/job1] Exec command '[bash --noprofile --norc -e -o pipefail /Users/user/git/github/Crypto-Model/vygr-infra/workflow/set-matrix]' [build/job1] ⚙ ::set-output:: matrix={"include":[{"project":"foo","config":"Debug"},{"project":"bar","config":"Release"}]} DEBU[0001] Loading slug from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0001] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0001] Loading revision from git directory '/Users/user/git/github/Crypto-Model/vygr-infra/.git' DEBU[0001] Found revision: 3051e2500d74be9e80e2bda460a6e94726ff65bf DEBU[0001] HEAD points to '3051e2500d74be9e80e2bda460a6e94726ff65bf' DEBU[0001] using github ref: refs/heads/VOYAGER-140-gha-matrix-gh-org DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] DEBU[0001] context needs => map[] DEBU[0001] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:set-matrix GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/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:job1 GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/VOYAGER-140-gha-matrix-gh-org GITHUB_REPOSITORY:Crypto-model/vygr-infra GITHUB_REPOSITORY_OWNER:Crypto-model GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3051e2500d74be9e80e2bda460a6e94726ff65bf GITHUB_TOKEN: GITHUB_WORKFLOW:build GITHUB_WORKSPACE:/Users/user/git/github/Crypto-Model/vygr-infra IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.18.2/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root] DEBU[0001] Evaluating 'steps['set-matrix']['outputs']['matrix']' instead of 'steps.set-matrix.outputs.matrix' [build/job1] ✅ Success - echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" [build/job1] Removed container: a80bc9e8520a196bd313c50f5f83e6a753311a4c7cbec41ccab6eb9fe172319d [build/job1] 🐳 docker volume rm act-build-job1 ``` </details>
kerem 2026-03-01 21:44:17 +03:00
Author
Owner

@souravsaraf123 commented on GitHub (Dec 4, 2021):

This matrix feature would be really useful. Consider this as +1.

<!-- gh-comment-id:985973103 --> @souravsaraf123 commented on GitHub (Dec 4, 2021): This matrix feature would be really useful. Consider this as +1.
Author
Owner

@freearhey commented on GitHub (Dec 12, 2021):

Here is another example:

https://stackoverflow.com/a/62953566

name: test
on:
  workflow_dispatch:
jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
      - id: set-matrix
        run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
  job2:
    needs: job1
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{fromJson(needs.job1.outputs.matrix)}}
    steps:
      - run: echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
Log
[test/job1] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[test/job1]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[test/job1]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job1]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job1]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[test/job1] ⭐  Run echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
[test/job1]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/set-matrix] user= workdir=
[test/job1]   ⚙  ::set-output:: matrix={"include":[{"project":"foo","config":"Debug"},{"project":"bar","config":"Release"}]}
[test/job1]   ✅  Success - echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
[test/job2] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[test/job2]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[test/job2]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job2]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job2]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[test/job2] ⭐  Run echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
[test/job2]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/0] user= workdir=
| project=; config=
[test/job2]   ✅  Success - echo "project=${{ matrix.project }}; config=${{ matrix.config }}"

And here is an example that currently gives the correct result:

name: test
on:
  workflow_dispatch:
jobs:
  job2:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        project: []
        config: []
        include:
          - project: foo
            config: Debug
          - project: bar
            config: Release
    steps:
      - run: echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
Log
[test/job2-1] 🧪  Matrix: map[config:Debug project:foo]
[test/job2-1] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[test/job2-2] 🧪  Matrix: map[config:Release project:bar]
[test/job2-2] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[test/job2-1]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[test/job2-2]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[test/job2-1]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job2-2]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job2-2]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job2-1]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[test/job2-1]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[test/job2-2]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[test/job2-1] ⭐  Run echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
[test/job2-2] ⭐  Run echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
[test/job2-1]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/0] user= workdir=
[test/job2-2]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/0] user= workdir=
| project=foo; config=Debug
[test/job2-1]   ✅  Success - echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
| project=bar; config=Release
[test/job2-2]   ✅  Success - echo "project=${{ matrix.project }}; config=${{ matrix.config }}"
<!-- gh-comment-id:991844981 --> @freearhey commented on GitHub (Dec 12, 2021): Here is another example: https://stackoverflow.com/a/62953566 ```yml name: test on: workflow_dispatch: jobs: job1: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - id: set-matrix run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" job2: needs: job1 runs-on: ubuntu-latest strategy: matrix: ${{fromJson(needs.job1.outputs.matrix)}} steps: - run: echo "project=${{ matrix.project }}; config=${{ matrix.config }}" ``` <details> <summary>Log</summary> ```sh [test/job1] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-latest [test/job1] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false [test/job1] 🐳 docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job1] 🐳 docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job1] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir= [test/job1] ⭐ Run echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" [test/job1] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/set-matrix] user= workdir= [test/job1] ⚙ ::set-output:: matrix={"include":[{"project":"foo","config":"Debug"},{"project":"bar","config":"Release"}]} [test/job1] ✅ Success - echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" [test/job2] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-latest [test/job2] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false [test/job2] 🐳 docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job2] 🐳 docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job2] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir= [test/job2] ⭐ Run echo "project=${{ matrix.project }}; config=${{ matrix.config }}" [test/job2] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/0] user= workdir= | project=; config= [test/job2] ✅ Success - echo "project=${{ matrix.project }}; config=${{ matrix.config }}" ``` </details> And here is an example that currently gives the correct result: ```yml name: test on: workflow_dispatch: jobs: job2: runs-on: ubuntu-latest strategy: matrix: project: [] config: [] include: - project: foo config: Debug - project: bar config: Release steps: - run: echo "project=${{ matrix.project }}; config=${{ matrix.config }}" ``` <details> <summary>Log</summary> ```sh [test/job2-1] 🧪 Matrix: map[config:Debug project:foo] [test/job2-1] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-latest [test/job2-2] 🧪 Matrix: map[config:Release project:bar] [test/job2-2] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-latest [test/job2-1] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false [test/job2-2] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false [test/job2-1] 🐳 docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job2-2] 🐳 docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job2-2] 🐳 docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job2-1] 🐳 docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [test/job2-1] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir= [test/job2-2] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir= [test/job2-1] ⭐ Run echo "project=${{ matrix.project }}; config=${{ matrix.config }}" [test/job2-2] ⭐ Run echo "project=${{ matrix.project }}; config=${{ matrix.config }}" [test/job2-1] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/0] user= workdir= [test/job2-2] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/Arhey/Code/iptv-org/iptv/workflow/0] user= workdir= | project=foo; config=Debug [test/job2-1] ✅ Success - echo "project=${{ matrix.project }}; config=${{ matrix.config }}" | project=bar; config=Release [test/job2-2] ✅ Success - echo "project=${{ matrix.project }}; config=${{ matrix.config }}" ``` </details>
Author
Owner

@catthehacker commented on GitHub (Dec 12, 2021):

Duplicate of #769

<!-- gh-comment-id:991845989 --> @catthehacker commented on GitHub (Dec 12, 2021): Duplicate of #769
Author
Owner

@grigorye commented on GitHub (Jun 2, 2022):

And here is an example that currently gives the correct result:

name: test
on:
  workflow_dispatch:
jobs:
  job2:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        project: []
        config: []
        include:
          - project: foo
            config: Debug
          - project: bar
            config: Release
    steps:
      - run: echo "project=${{ matrix.project }}; config=${{ matrix.config }}"

@freearhey While it indeed works as a workaround (thanks a lot for figuring it out!), empty arrays break "real" GitHub action runner with "The workflow is not valid. ... Matrix vector xxx does not contain any values" error. Do you have any idea of a workaround?

<!-- gh-comment-id:1144738229 --> @grigorye commented on GitHub (Jun 2, 2022): > And here is an example that currently gives the correct result: > > ```yaml > name: test > on: > workflow_dispatch: > jobs: > job2: > runs-on: ubuntu-latest > strategy: > matrix: > project: [] > config: [] > include: > - project: foo > config: Debug > - project: bar > config: Release > steps: > - run: echo "project=${{ matrix.project }}; config=${{ matrix.config }}" > ``` @freearhey While it indeed works as a workaround (thanks a lot for figuring it out!), empty arrays break "real" GitHub action runner with "The workflow is not valid. ... Matrix vector xxx does not contain any values" error. Do you have any idea of a workaround?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#540
No description provided.