Open 20k-ultra opened 1 year ago
By the way, if I set if: false
for the step I want to skip, this error is still thrown so I don't think I can add any expression to try and work around this.
Maybe there's a way I can do something like this if it exists (just tested and it doesn't work but maybe there's a correct way to do this)
python: ${{ steps.python_versions.outputs.json }} || "[]"
Issue is stale and will be closed in 14 days unless there is new activity
Issue is stale and will be closed in 14 days unless there is new activity
I am finding this same bug at this exact moment
EDIT:
Just so you know, I worked around this by always passing at least an empty array "[]" to the matrix job, and also doing a multi-statement if check to make sure the array is not empty, because it was running the matrix job even with an empty array LOL
it was running the matrix job even with an empty array LOL
That's in parity with GitHub Actions (Part of undocumented behavior).
BTW I'm not affected by this problem due to how I use act, so it doesn't gain much attention from my side
I found this same issue when I tried to generate the input for the matrix in a dependent job of the main one.
Bug report info
Command used with act
Describe issue
I have a step in my workflow which uses another job's output as a matrix parameter. The problem is that this job output is null can be null for specific conditions. I protect my step from trying to evaluate null within the matrix by using an if expression.
On Github, this setup is fine and the job is skipped as expected. With act, the job should be skipped also but instead, an error is thrown from not being able to unmarshal nil to JSON.
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
Here is a link to github run: https://github.com/20k-ultra/action-tester/actions/runs/3580010001