Skip to content

Commit

Permalink
fix #108 - ensure container names are unique for matrix runs
Browse files Browse the repository at this point in the history
  • Loading branch information
cplee committed Mar 5, 2020
1 parent 4f84be1 commit 59b9b8e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .actrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-P ubuntu-latest=nektos/act-environments-ubuntu:18.04
-P ubuntu-latest=nektos/act-environments-ubuntu:18.04
2 changes: 1 addition & 1 deletion pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {

for i, matrix := range matrixes {
rc := runner.newRunContext(run, matrix)
if len(matrix) > 1 {
if len(matrixes) > 1 {
rc.Name = fmt.Sprintf("%s-%d", rc.Name, i+1)
}
if len(rc.String()) > maxJobNameLen {
Expand Down
10 changes: 10 additions & 0 deletions pkg/runner/testdata/matrix/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ jobs:
matrix:
os: [ubuntu-18.04, macos-latest]
node: [4, 6, 8, 10]

test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [8.x, 10.x, 12.x, 13.x]
steps:
- run: echo ${NODE_VERSION} | grep ${{ matrix.node }}
env:
NODE_VERSION: ${{ matrix.node }}

0 comments on commit 59b9b8e

Please sign in to comment.