diff --git a/cmd/root.go b/cmd/root.go index 320ae9b6..11ec150c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/cobra/doc" "github.com/spf13/pflag" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" "github.com/actions-oss/act-cli/pkg/artifactcache" "github.com/actions-oss/act-cli/pkg/artifacts" diff --git a/go.mod b/go.mod index 4d34e001..e800c917 100644 --- a/go.mod +++ b/go.mod @@ -28,8 +28,8 @@ require ( github.com/stretchr/testify v1.11.1 github.com/timshannon/bolthold v0.0.0-20240314194003-30aac6950928 go.etcd.io/bbolt v1.4.3 + go.yaml.in/yaml/v4 v4.0.0-rc.2 golang.org/x/term v0.37.0 - gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.5.2 ) @@ -104,6 +104,7 @@ require ( golang.org/x/time v0.6.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/rhysd/actionlint => github.com/actions-oss/act-cli-actionlint v0.0.0-20250517100532-8f847f29ba36 diff --git a/go.sum b/go.sum index d7294d18..10ec6e31 100644 --- a/go.sum +++ b/go.sum @@ -225,6 +225,8 @@ go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qq go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.yaml.in/yaml/v4 v4.0.0-rc.2 h1:/FrI8D64VSr4HtGIlUtlFMGsm7H7pWTbj6vOLVZcA6s= +go.yaml.in/yaml/v4 v4.0.0-rc.2/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= diff --git a/internal/model/anchors.go b/internal/model/anchors.go index e68c74a7..63ea623b 100644 --- a/internal/model/anchors.go +++ b/internal/model/anchors.go @@ -3,7 +3,7 @@ package model import ( "errors" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // Assumes there is no cycle ensured via test TestVerifyCycleIsInvalid diff --git a/internal/model/strategy_utils.go b/internal/model/strategy_utils.go index edcb81eb..2f47976d 100644 --- a/internal/model/strategy_utils.go +++ b/internal/model/strategy_utils.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // TraceWriter is an interface for logging trace information. diff --git a/internal/model/strategy_utils_test.go b/internal/model/strategy_utils_test.go index cb0c6ec3..7f68b683 100644 --- a/internal/model/strategy_utils_test.go +++ b/internal/model/strategy_utils_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) type EmptyTraceWriter struct { diff --git a/internal/model/token_utils.go b/internal/model/token_utils.go index dce92fb8..d3f2954c 100644 --- a/internal/model/token_utils.go +++ b/internal/model/token_utils.go @@ -4,7 +4,7 @@ import ( "strings" v2 "github.com/actions-oss/act-cli/internal/eval/v2" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // DeepEquals compares two yaml.Node values recursively. diff --git a/internal/model/workflow_state.go b/internal/model/workflow_state.go index d5451448..5cd464bc 100644 --- a/internal/model/workflow_state.go +++ b/internal/model/workflow_state.go @@ -1,6 +1,6 @@ package model -import "gopkg.in/yaml.v3" +import "go.yaml.in/yaml/v4" type JobStatus int diff --git a/internal/model/workflow_state_test.go b/internal/model/workflow_state_test.go index 9cfe8eda..9edf9973 100644 --- a/internal/model/workflow_state_test.go +++ b/internal/model/workflow_state_test.go @@ -9,7 +9,7 @@ import ( "github.com/actions-oss/act-cli/pkg/schema" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestParseWorkflow(t *testing.T) { diff --git a/internal/templateeval/evaluate.go b/internal/templateeval/evaluate.go index 885c5326..c604c623 100644 --- a/internal/templateeval/evaluate.go +++ b/internal/templateeval/evaluate.go @@ -8,7 +8,7 @@ import ( v2 "github.com/actions-oss/act-cli/internal/eval/v2" exprparser "github.com/actions-oss/act-cli/internal/expr" "github.com/actions-oss/act-cli/pkg/schema" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) type ExpressionEvaluator struct { diff --git a/internal/templateeval/evaluate_test.go b/internal/templateeval/evaluate_test.go index 3d69a30b..7fb8e572 100644 --- a/internal/templateeval/evaluate_test.go +++ b/internal/templateeval/evaluate_test.go @@ -7,7 +7,7 @@ import ( v2 "github.com/actions-oss/act-cli/internal/eval/v2" "github.com/actions-oss/act-cli/pkg/schema" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestEval(t *testing.T) { diff --git a/pkg/model/action.go b/pkg/model/action.go index 1c7b231c..d8a1efba 100644 --- a/pkg/model/action.go +++ b/pkg/model/action.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/actions-oss/act-cli/pkg/schema" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // ActionRunsUsing is the type of runner for the action diff --git a/pkg/model/anchors.go b/pkg/model/anchors.go index a75ee944..13b3dcdf 100644 --- a/pkg/model/anchors.go +++ b/pkg/model/anchors.go @@ -3,7 +3,7 @@ package model import ( "errors" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func resolveAliasesExt(node *yaml.Node, path map[*yaml.Node]bool, skipCheck bool) error { diff --git a/pkg/model/anchors_test.go b/pkg/model/anchors_test.go index b84945b8..c89bc48b 100644 --- a/pkg/model/anchors_test.go +++ b/pkg/model/anchors_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestVerifyNilAliasError(t *testing.T) { diff --git a/pkg/model/workflow.go b/pkg/model/workflow.go index 8d9221b9..0e0fe5ae 100644 --- a/pkg/model/workflow.go +++ b/pkg/model/workflow.go @@ -12,7 +12,7 @@ import ( "github.com/actions-oss/act-cli/pkg/common" "github.com/actions-oss/act-cli/pkg/schema" log "github.com/sirupsen/logrus" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // Workflow is the structure of the files in .github/workflows diff --git a/pkg/model/workflow_test.go b/pkg/model/workflow_test.go index 339a9e87..970eed4f 100644 --- a/pkg/model/workflow_test.go +++ b/pkg/model/workflow_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestReadWorkflow_StringEvent(t *testing.T) { diff --git a/pkg/runner/expression.go b/pkg/runner/expression.go index 1203ba90..616e1895 100644 --- a/pkg/runner/expression.go +++ b/pkg/runner/expression.go @@ -16,7 +16,7 @@ import ( "github.com/actions-oss/act-cli/pkg/container" "github.com/actions-oss/act-cli/pkg/exprparser" "github.com/actions-oss/act-cli/pkg/model" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // ExpressionEvaluator is the interface for evaluating expressions diff --git a/pkg/runner/expression_test.go b/pkg/runner/expression_test.go index 34d5f92a..48abd173 100644 --- a/pkg/runner/expression_test.go +++ b/pkg/runner/expression_test.go @@ -11,7 +11,7 @@ import ( "github.com/actions-oss/act-cli/pkg/exprparser" "github.com/actions-oss/act-cli/pkg/model" assert "github.com/stretchr/testify/assert" - yaml "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v4" ) func createRunContext(t *testing.T) *RunContext { diff --git a/pkg/runner/run_context_test.go b/pkg/runner/run_context_test.go index d4b94285..5cd103ff 100644 --- a/pkg/runner/run_context_test.go +++ b/pkg/runner/run_context_test.go @@ -16,7 +16,7 @@ import ( log "github.com/sirupsen/logrus" assert "github.com/stretchr/testify/assert" - yaml "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v4" ) func TestRunContext_EvalBool(t *testing.T) { diff --git a/pkg/runner/runner_test.go b/pkg/runner/runner_test.go index f0714061..29e9176f 100644 --- a/pkg/runner/runner_test.go +++ b/pkg/runner/runner_test.go @@ -18,7 +18,7 @@ import ( "github.com/joho/godotenv" log "github.com/sirupsen/logrus" assert "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" "github.com/actions-oss/act-cli/pkg/common" "github.com/actions-oss/act-cli/pkg/model" diff --git a/pkg/runner/step_action_local_test.go b/pkg/runner/step_action_local_test.go index 44f7d2d7..747c6894 100644 --- a/pkg/runner/step_action_local_test.go +++ b/pkg/runner/step_action_local_test.go @@ -11,7 +11,7 @@ import ( "github.com/actions-oss/act-cli/pkg/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) type stepActionLocalMocks struct { diff --git a/pkg/runner/step_action_remote_test.go b/pkg/runner/step_action_remote_test.go index 630163c5..5549092b 100644 --- a/pkg/runner/step_action_remote_test.go +++ b/pkg/runner/step_action_remote_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" "github.com/actions-oss/act-cli/pkg/common" "github.com/actions-oss/act-cli/pkg/model" diff --git a/pkg/runner/step_test.go b/pkg/runner/step_test.go index 4f7b336a..4b505ae6 100644 --- a/pkg/runner/step_test.go +++ b/pkg/runner/step_test.go @@ -9,7 +9,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - yaml "gopkg.in/yaml.v3" + yaml "go.yaml.in/yaml/v4" ) func TestMergeIntoMap(t *testing.T) { diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go index c0a48d63..580d0377 100644 --- a/pkg/schema/schema.go +++ b/pkg/schema/schema.go @@ -11,7 +11,7 @@ import ( "strings" exprparser "github.com/actions-oss/act-cli/internal/expr" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) //go:embed workflow_schema.json diff --git a/pkg/schema/schema_test.go b/pkg/schema/schema_test.go index d2683d66..6bdf837d 100644 --- a/pkg/schema/schema_test.go +++ b/pkg/schema/schema_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestAdditionalFunctions(t *testing.T) {