Support secrets in cli exec (#5374)

This commit is contained in:
qwerty287
2025-07-31 07:13:07 +03:00
committed by GitHub
parent eced1ee886
commit 12cd608150
3 changed files with 11 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ import (
"context"
"fmt"
"io"
"maps"
"os"
"path"
"path/filepath"
@@ -146,9 +147,9 @@ func execWithAxis(ctx context.Context, c *cli.Command, file, repoPath string, ax
}
environ := metadata.Environ()
maps.Copy(environ, metadata.Workflow.Matrix)
var secrets []compiler.Secret
for key, val := range metadata.Workflow.Matrix {
environ[key] = val
for key, val := range c.StringMap("secrets") {
secrets = append(secrets, compiler.Secret{
Name: key,
Value: val,