diff --git a/assets/go-licenses.json b/assets/go-licenses.json index 0f2913a6ad..7bfd1fceeb 100644 --- a/assets/go-licenses.json +++ b/assets/go-licenses.json @@ -39,6 +39,16 @@ "path": "filippo.io/edwards25519/LICENSE", "licenseText": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" }, + { + "name": "gitea.com/gitea/runner", + "path": "gitea.com/gitea/runner/LICENSE", + "licenseText": "Copyright (c) 2022 The Gitea Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "gitea.com/gitea/runner/act", + "path": "gitea.com/gitea/runner/act/LICENSE", + "licenseText": "MIT License\n\nCopyright (c) 2022 The Gitea Authors\nCopyright (c) 2019\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, { "name": "gitea.com/go-chi/binding", "path": "gitea.com/go-chi/binding/LICENSE", @@ -959,11 +969,6 @@ "path": "github.com/munnerz/goautoneg/LICENSE", "licenseText": "Copyright (c) 2011, Open Knowledge Foundation Ltd.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the\n distribution.\n\n Neither the name of the Open Knowledge Foundation Ltd. nor the\n names of its contributors may be used to endorse or promote\n products derived from this software without specific prior written\n permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" }, - { - "name": "github.com/nektos/act", - "path": "github.com/nektos/act/LICENSE", - "licenseText": "MIT License\n\nCopyright (c) 2022 The Gitea Authors\nCopyright (c) 2019\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" - }, { "name": "github.com/niklasfasching/go-org", "path": "github.com/niklasfasching/go-org/LICENSE", diff --git a/go.mod b/go.mod index 4cd9a77a1f..f113a29b18 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( code.gitea.io/sdk/gitea v0.24.1 codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 connectrpc.com/connect v1.19.2 + gitea.com/gitea/runner v1.0.0 gitea.com/go-chi/binding v0.0.0-20260414111559-654cea7ac60a gitea.com/go-chi/cache v0.2.1 gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098 @@ -85,7 +86,6 @@ require ( github.com/microsoft/go-mssqldb v1.9.6 github.com/minio/minio-go/v7 v7.1.0 github.com/msteinert/pam/v2 v2.1.0 - github.com/nektos/act v0.2.63 github.com/niklasfasching/go-org v1.9.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.1 @@ -301,8 +301,6 @@ ignore ( replace github.com/jaytaylor/html2text => github.com/Necoro/html2text v0.0.0-20250804200300-7bf1ce1c7347 // jaytaylor/html2text is unmaintained -replace github.com/nektos/act => gitea.com/gitea/act v0.261.10 // gitea maintains its own package - replace github.com/urfave/cli/v3 => github.com/urfave/cli/v3 v3.4.1 // v3.6.2 breaks -c flag parsing in help commands replace go.yaml.in/yaml/v4 => go.yaml.in/yaml/v4 v4.0.0-rc.3 // rc.4 changes block scalar serialization, wait for stable release diff --git a/go.sum b/go.sum index 2574251eec..c6387bd277 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= -gitea.com/gitea/act v0.261.10 h1:ndwbtuMXXz1dpYF2iwY1/PkgKNETo4jmPXfinTZt8cs= -gitea.com/gitea/act v0.261.10/go.mod h1:oIkqQHvU0lfuIWwcpqa4FmU+t3prA89tgkuHUTsrI2c= +gitea.com/gitea/runner v1.0.0 h1:s3AS5u8r+B5W+Gy69sYYvCVTb0f23fRM6H+CbrFrobE= +gitea.com/gitea/runner v1.0.0/go.mod h1:bn+8Qt3KyvdVQHD3OR2yRoKgEXs8dXqwBVtmfYVrNIE= gitea.com/go-chi/binding v0.0.0-20260414111559-654cea7ac60a h1:JHoBrfuTSF9Ke9aNfSYj1XRPBHjKPgCApVprnt2Am0M= gitea.com/go-chi/binding v0.0.0-20260414111559-654cea7ac60a/go.mod h1:FOsLJIMdpiHzBp3Vby6Wfkdw2ppGscrjgU1IC7E4/zQ= gitea.com/go-chi/cache v0.2.1 h1:bfAPkvXlbcZxPCpcmDVCWoHgiBSBmZN/QosnZvEC0+g= @@ -686,8 +686,9 @@ github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= diff --git a/models/actions/artifact.go b/models/actions/artifact.go index f0effdeeca..1de83a29c5 100644 --- a/models/actions/artifact.go +++ b/models/actions/artifact.go @@ -1,7 +1,7 @@ // Copyright 2023 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -// This artifact server is inspired by https://github.com/nektos/act/blob/master/pkg/artifacts/server.go. +// This artifact server is inspired by the Gitea runner artifact server implementation. // It updates url setting and uses ObjectStore to handle artifacts persistence. package actions diff --git a/modules/actions/jobparser/evaluator.go b/modules/actions/jobparser/evaluator.go index b320095071..3e314afb62 100644 --- a/modules/actions/jobparser/evaluator.go +++ b/modules/actions/jobparser/evaluator.go @@ -9,7 +9,7 @@ import ( "regexp" "strings" - "github.com/nektos/act/pkg/exprparser" + "gitea.com/gitea/runner/act/exprparser" "go.yaml.in/yaml/v4" ) diff --git a/modules/actions/jobparser/interpeter.go b/modules/actions/jobparser/interpeter.go index 512b6f02ab..37defeff7a 100644 --- a/modules/actions/jobparser/interpeter.go +++ b/modules/actions/jobparser/interpeter.go @@ -4,8 +4,8 @@ package jobparser import ( - "github.com/nektos/act/pkg/exprparser" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/exprparser" + "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/modules/actions/jobparser/jobparser.go b/modules/actions/jobparser/jobparser.go index 76f229a54b..f2ab0ad3c9 100644 --- a/modules/actions/jobparser/jobparser.go +++ b/modules/actions/jobparser/jobparser.go @@ -9,8 +9,8 @@ import ( "sort" "strings" - "github.com/nektos/act/pkg/exprparser" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/exprparser" + "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/modules/actions/jobparser/model.go b/modules/actions/jobparser/model.go index 7132c278e9..2c4bd1f93a 100644 --- a/modules/actions/jobparser/model.go +++ b/modules/actions/jobparser/model.go @@ -8,7 +8,7 @@ import ( "errors" "fmt" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/modules/actions/jobparser/model_test.go b/modules/actions/jobparser/model_test.go index d0e8204161..bd29cb9425 100644 --- a/modules/actions/jobparser/model_test.go +++ b/modules/actions/jobparser/model_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.yaml.in/yaml/v4" diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index ba1aee7d72..0269e8b0bb 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -17,8 +17,8 @@ import ( "code.gitea.io/gitea/modules/util" webhook_module "code.gitea.io/gitea/modules/webhook" - "github.com/nektos/act/pkg/model" - "github.com/nektos/act/pkg/workflowpattern" + "gitea.com/gitea/runner/act/model" + "gitea.com/gitea/runner/act/workflowpattern" "go.yaml.in/yaml/v4" ) diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index 1d38cc2f53..09b0cc5b2d 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -35,7 +35,7 @@ import ( "code.gitea.io/gitea/services/convert" secret_service "code.gitea.io/gitea/services/secrets" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" ) // ListActionsSecrets list an repo's actions secrets diff --git a/routers/web/repo/actions/actions.go b/routers/web/repo/actions/actions.go index 1e9f596fc4..5c454dac24 100644 --- a/routers/web/repo/actions/actions.go +++ b/routers/web/repo/actions/actions.go @@ -28,7 +28,7 @@ import ( "code.gitea.io/gitea/services/context" "code.gitea.io/gitea/services/convert" - act_model "github.com/nektos/act/pkg/model" + act_model "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/routers/web/repo/actions/actions_test.go b/routers/web/repo/actions/actions_test.go index 9e83ff0fbb..3925337844 100644 --- a/routers/web/repo/actions/actions_test.go +++ b/routers/web/repo/actions/actions_test.go @@ -11,7 +11,7 @@ import ( "code.gitea.io/gitea/models/db" unittest "code.gitea.io/gitea/models/unittest" - act_model "github.com/nektos/act/pkg/model" + act_model "gitea.com/gitea/runner/act/model" "github.com/stretchr/testify/assert" ) diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index 07a7187955..3ce4337fbc 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -35,7 +35,7 @@ import ( actions_service "code.gitea.io/gitea/services/actions" context_module "code.gitea.io/gitea/services/context" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" ) func findCurrentJobByPathParam(ctx *context_module.Context, jobs []*actions_model.ActionRunJob) (job *actions_model.ActionRunJob, hasPathParam bool) { diff --git a/services/actions/concurrency.go b/services/actions/concurrency.go index e1ec549930..990c0e9a0b 100644 --- a/services/actions/concurrency.go +++ b/services/actions/concurrency.go @@ -12,7 +12,7 @@ import ( "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" - act_model "github.com/nektos/act/pkg/model" + act_model "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/services/actions/context.go b/services/actions/context.go index 9250c40983..1d4a08459d 100644 --- a/services/actions/context.go +++ b/services/actions/context.go @@ -18,7 +18,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" ) type GiteaContext map[string]any diff --git a/services/actions/context_test.go b/services/actions/context_test.go index 22f9abcce8..d86ec47a3c 100644 --- a/services/actions/context_test.go +++ b/services/actions/context_test.go @@ -10,7 +10,7 @@ import ( actions_model "code.gitea.io/gitea/models/actions" "code.gitea.io/gitea/models/unittest" - act_model "github.com/nektos/act/pkg/model" + act_model "gitea.com/gitea/runner/act/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index 4d2a7113b9..3021f5bd0e 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -28,7 +28,7 @@ import ( webhook_module "code.gitea.io/gitea/modules/webhook" "code.gitea.io/gitea/services/convert" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" ) type methodCtxKeyType struct{} diff --git a/services/actions/rerun.go b/services/actions/rerun.go index f253181a8d..d4027b7c02 100644 --- a/services/actions/rerun.go +++ b/services/actions/rerun.go @@ -17,7 +17,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/services/actions/run.go b/services/actions/run.go index 162e3678ae..ed3b3728f7 100644 --- a/services/actions/run.go +++ b/services/actions/run.go @@ -12,7 +12,7 @@ import ( "code.gitea.io/gitea/modules/actions/jobparser" "code.gitea.io/gitea/modules/util" - act_model "github.com/nektos/act/pkg/model" + act_model "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/services/actions/workflow.go b/services/actions/workflow.go index b41741403f..44dad71c4a 100644 --- a/services/actions/workflow.go +++ b/services/actions/workflow.go @@ -22,7 +22,7 @@ import ( "code.gitea.io/gitea/services/context" "code.gitea.io/gitea/services/convert" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" "go.yaml.in/yaml/v4" ) diff --git a/services/convert/convert.go b/services/convert/convert.go index a7622644d8..dc1692b6ca 100644 --- a/services/convert/convert.go +++ b/services/convert/convert.go @@ -38,7 +38,7 @@ import ( "code.gitea.io/gitea/services/gitdiff" runnerv1 "code.gitea.io/actions-proto-go/runner/v1" - "github.com/nektos/act/pkg/model" + "gitea.com/gitea/runner/act/model" ) // ToEmail convert models.EmailAddress to api.Email