-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue: Dynamic Matrix not working #927
Comments
Issue is stale and will be closed in 14 days unless there is new activity |
Any update? |
The output of this line doesn't seem to work for me with actions/runner
It stores value
Actually no, at least not for nektos/act. I can confirm this bug in act. After fixing the error above, you can use my runner.server utillity to execute it locally like you would expect. I know that my utillity is slower than act, but faster than GitHub Actions. Log of a run via runner.server
|
I opened a Pull Request #964 to provide even better dynamic matrix support as in act 0.2.24. Including 3 tests to enshure that this feature doesn't break again without notice. |
To add some more details on things that does not work related to dynamic matrix.
jobs:
job1:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: get parent directory and set matrix
id: set-matrix
run: |
echo "::set-output name=matrix::[\"a\",\"b\"]"
job2:
needs: [job1]
runs-on: ubuntu-latest
strategy:
matrix:
dirs: ${{fromJson(needs.job1.outputs.matrix)}}
steps:
- run: |
echo "${{ matrix.dirs }}" Gives:
jobs:
job1:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: get parent directory and set matrix
id: set-matrix
run: |
echo "::set-output name=matrix::{\"dirs\":[\"a\",\"b\"]}"
job2:
needs: [job1]
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.job1.outputs.matrix)}}
steps:
- run: |
echo "${{ matrix.dirs }}" Simply prints empty line. Both of those cases executes as 2 separate jobs on GHA, printing |
I just installed nektos/act and I experienced the same error. I have a workflow similar to @ilons 's last post's first example. Job 1 sets up the matrix. Job 2 uses the output of Job 1 wrapped in
|
System information
act
:act
version: act version HEAD-cad4bc8Expected behaviour
The following workflow file should work, the matrix dynamic value should be evaluated after the first job is done and passed to matrix of second job.
Actual behaviour
Matrix is not evaluated
Workflow and/or repository
workflow
Steps to reproduce
act
outputLog
The text was updated successfully, but these errors were encountered: