Dynamic Matrix not working #393

Open
opened 2023-10-31 12:10:25 +00:00 by gilesbradshaw · 2 comments

Despite this issue apparently being fixed https://github.com/nektos/act/issues/927

The following workflow does not dynamically evaluate the matrix (it does on github)

name: schema-test
run-name: test setting matix from JSON
on:
  push:
jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
    - id: set-matrix
      run: echo "matrix=[\"afile\", \"another file\"]" >> $GITHUB_OUTPUT
  job2:
    needs: job1
    runs-on: ubuntu-latest
    strategy:
      matrix:
        manifest: ${{ fromJSON(needs.job1.outputs.matrix) }}
    steps:
    - run: echo ${{ matrix.manifest }}


Despite this issue apparently being fixed https://github.com/nektos/act/issues/927 The following workflow does not dynamically evaluate the matrix (it does on github) ``` name: schema-test run-name: test setting matix from JSON on: push: jobs: job1: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - id: set-matrix run: echo "matrix=[\"afile\", \"another file\"]" >> $GITHUB_OUTPUT job2: needs: job1 runs-on: ubuntu-latest strategy: matrix: manifest: ${{ fromJSON(needs.job1.outputs.matrix) }} steps: - run: echo ${{ matrix.manifest }} ```
lng2020 added the
kind
bug
label 2023-11-17 09:19:56 +00:00

This is partly caused by yaml, which is similar to this issue https://github.com/nektos/act/issues/330
as you can see this error in your Gitea's log:
image

And I think the design of Gitea Actions now can not easily support Matrix even nektos/act does.
ps: this workflow works well when using act_runner exec cmd.

This is partly caused by yaml, which is similar to this issue https://github.com/nektos/act/issues/330 as you can see this error in your Gitea's log: ![image](/attachments/17526d2f-a88b-4a4b-8b88-2cdf8a3de0cc) And I think the design of Gitea Actions now can not easily support Matrix even nektos/act does. ps: this workflow works well when using `act_runner exec` cmd.
Found a same issue https://github.com/go-gitea/gitea/issues/25179
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
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: gitea/act_runner#393
No description provided.