Skip to content

Commit

Permalink
fix: problems caused by empty matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
silky committed Feb 9, 2025
1 parent bf0817d commit 162671c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/model/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ func (j *Job) GetMatrixes() ([]map[string]interface{}, error) {
}
matrixes = append(matrixes, matrix)
}
if len(matrixes) == 0 {
matrixes = append(matrixes, make(map[string]interface{}))
}
// FIX: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#expanding-or-adding-matrix-configurations
//
// For each object in the include list, the key:value pairs in the object will be added to each of the matrix combinations
Expand Down

0 comments on commit 162671c

Please sign in to comment.