repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/truststore_java.go | truststore_java.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"crypto/sha1"
"crypto/sha256"
"crypto/x509"
"encoding/hex"
"hash"
"os"
"os/exec"
"path/filepath"
"runtime"
"string... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/truststore_linux.go | truststore_linux.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
)
var (
FirefoxProfiles = []string{os.Getenv("HOME") + "/.moz... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/truststore_nss.go | truststore_nss.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"log"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
)
var (
hasNSS bool
hasCertutil bool
certutilPath ... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/truststore_windows.go | truststore_windows.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"crypto/x509"
"encoding/pem"
"fmt"
"io/ioutil"
"math/big"
"os"
"path/filepath"
"syscall"
"unsafe"
)
var (
FirefoxProfiles ... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/truststore_darwin.go | truststore_darwin.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"encoding/asn1"
"io/ioutil"
"log"
"os"
"path/filepath"
"howett.net/plist"
)
var (
FirefoxProfiles = []string{os... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/cert.go | cert.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/x509"
"crypto/x509/pkix"
"encodin... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
FiloSottile/mkcert | https://github.com/FiloSottile/mkcert/blob/1c1dc4ed27ed5936046b6398d39cab4d657a2d8e/main.go | main.go | // Copyright 2018 The mkcert Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Command mkcert is a simple zero-config tool to make development certificates.
package main
import (
"crypto"
"crypto/x509"
"flag"
"fmt"
"log"
"net... | go | BSD-3-Clause | 1c1dc4ed27ed5936046b6398d39cab4d657a2d8e | 2026-01-07T08:35:43.510017Z | false |
base/node | https://github.com/base/node/blob/29fcaba8537427f848786b62bdcffebba6a33254/dependency_updater/dependency_updater.go | dependency_updater/dependency_updater.go | package main
import (
"context"
"encoding/json"
"fmt"
"slices"
"time"
"github.com/ethereum-optimism/optimism/op-service/retry"
"github.com/google/go-github/v72/github"
"github.com/urfave/cli/v3"
"log"
"os"
"os/exec"
"strings"
)
type Info struct {
Tag string `json:"tag,omitempty"`
Commit strin... | go | MIT | 29fcaba8537427f848786b62bdcffebba6a33254 | 2026-01-07T08:35:43.469798Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/main_test.go | main_test.go | package main
import (
"os"
"testing"
)
func TestMain(_ *testing.T) {
os.Args = []string{"act", "--help"}
main()
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/main.go | main.go | package main
import (
_ "embed"
"github.com/nektos/act/cmd"
"github.com/nektos/act/pkg/common"
)
//go:embed VERSION
var version string
func main() {
ctx, cancel := common.CreateGracefulJobCancellationContext()
defer cancel()
// run the command
cmd.Execute(ctx, version)
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/gh/gh.go | pkg/gh/gh.go | package gh
import (
"bufio"
"bytes"
"context"
"os/exec"
)
func GetToken(ctx context.Context, workingDirectory string) (string, error) {
var token string
// Locate the 'gh' executable
path, err := exec.LookPath("gh")
if err != nil {
return "", err
}
// Command setup
cmd := exec.CommandContext(ctx, path,... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/gh/gh_test.go | pkg/gh/gh_test.go | package gh
import (
"context"
"testing"
)
func TestGetToken(t *testing.T) {
token, _ := GetToken(context.TODO(), "")
t.Log(token)
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/lookpath/error.go | pkg/lookpath/error.go | package lookpath
type Error struct {
Name string
Err error
}
func (e *Error) Error() string {
return e.Err.Error()
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/lookpath/lp_js.go | pkg/lookpath/lp_js.go | // Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build js && wasm
package lookpath
import (
"errors"
)
// ErrNotFound is the error resulting if a path search failed to find an executable file.
var Err... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/lookpath/lp_windows.go | pkg/lookpath/lp_windows.go | // Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package lookpath
import (
"errors"
"io/fs"
"os"
"path/filepath"
"strings"
)
// ErrNotFound is the error resulting if a path search failed to find an exec... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/lookpath/env.go | pkg/lookpath/env.go | package lookpath
import "os"
type Env interface {
Getenv(name string) string
}
type defaultEnv struct {
}
func (*defaultEnv) Getenv(name string) string {
return os.Getenv(name)
}
func LookPath(file string) (string, error) {
return LookPath2(file, &defaultEnv{})
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/lookpath/lp_plan9.go | pkg/lookpath/lp_plan9.go | // Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package lookpath
import (
"errors"
"io/fs"
"os"
"path/filepath"
"strings"
)
// ErrNotFound is the error resulting if a path search failed to find an exec... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/lookpath/lp_unix.go | pkg/lookpath/lp_unix.go | // Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
package lookpath
import (
"errors"
"io/fs"
"os"
"path/filepath"
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/job_context.go | pkg/model/job_context.go | package model
type JobContext struct {
Status string `json:"status"`
Container struct {
ID string `json:"id"`
Network string `json:"network"`
} `json:"container"`
Services map[string]struct {
ID string `json:"id"`
} `json:"services"`
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/anchors_test.go | pkg/model/anchors_test.go | package model
import (
"testing"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
)
func TestVerifyNilAliasError(t *testing.T) {
var node yaml.Node
err := yaml.Unmarshal([]byte(`
test:
- a
- b
- c`), &node)
*node.Content[0].Content[1].Content[1] = yaml.Node{
Kind: yaml.AliasNode,
}
assert.NoError(t,... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/workflow_test.go | pkg/model/workflow_test.go | package model
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
)
func TestReadWorkflow_StringEvent(t *testing.T) {
yaml := `
name: local-action-docker-url
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./action... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/action.go | pkg/model/action.go | package model
import (
"fmt"
"io"
"strings"
"github.com/nektos/act/pkg/schema"
"gopkg.in/yaml.v3"
)
// ActionRunsUsing is the type of runner for the action
type ActionRunsUsing string
func (a *ActionRunsUsing) UnmarshalYAML(unmarshal func(interface{}) error) error {
var using string
if err := unmarshal(&usin... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/workflow.go | pkg/model/workflow.go | package model
import (
"errors"
"fmt"
"io"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/schema"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
)
// Workflow is the structure of the files in .github/workflows
type Workflow struct {
File stri... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/planner.go | pkg/model/planner.go | package model
import (
"fmt"
"io"
"io/fs"
"math"
"os"
"path/filepath"
"regexp"
"sort"
log "github.com/sirupsen/logrus"
)
// WorkflowPlanner contains methods for creating plans
type WorkflowPlanner interface {
PlanEvent(eventName string) (*Plan, error)
PlanJob(jobName string) (*Plan, error)
PlanAll() (*Pl... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/github_context_test.go | pkg/model/github_context_test.go | package model
import (
"context"
"fmt"
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
func TestSetRef(t *testing.T) {
log.SetLevel(log.DebugLevel)
oldFindGitRef := findGitRef
oldFindGitRevision := findGitRevision
defer func() { findGitRef = oldFindGitRef }()
defer func()... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/github_context.go | pkg/model/github_context.go | package model
import (
"context"
"fmt"
"strings"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/common/git"
)
type GithubContext struct {
Event map[string]interface{} `json:"event"`
EventPath string `json:"event_path"`
Workflow string `... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/planner_test.go | pkg/model/planner_test.go | package model
import (
"path/filepath"
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
type WorkflowPlanTest struct {
workflowPath string
errorMessage string
noWorkflowRecurse bool
}
func TestPlanner(t *testing.T) {
log.SetLevel(log.DebugLevel)
tables := []Workf... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/step_result.go | pkg/model/step_result.go | package model
import "fmt"
type stepStatus int
const (
StepStatusSuccess stepStatus = iota
StepStatusFailure
StepStatusSkipped
)
var stepStatusStrings = [...]string{
"success",
"failure",
"skipped",
}
func (s stepStatus) MarshalText() ([]byte, error) {
return []byte(s.String()), nil
}
func (s *stepStatus) ... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/model/anchors.go | pkg/model/anchors.go | package model
import (
"errors"
"gopkg.in/yaml.v3"
)
func resolveAliasesExt(node *yaml.Node, path map[*yaml.Node]bool, skipCheck bool) error {
if !skipCheck && path[node] {
return errors.New("circular alias")
}
switch node.Kind {
case yaml.AliasNode:
aliasTarget := node.Alias
if aliasTarget == nil {
r... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_volume.go | pkg/container/docker_volume.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"context"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/volume"
"github.com/nektos/act/pkg/common"
)
func NewDockerVolumeRemoveExecutor(volumeName string, force bool) common.Exec... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_pull.go | pkg/container/docker_pull.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"strings"
"github.com/distribution/reference"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/registry"
"github.com/nektos/act/... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_auth.go | pkg/container/docker_auth.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"context"
"strings"
"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/credentials"
"github.com/docker/docker/api/types/registry"
"github.com/nektos/act/pkg/common"
)
func LoadDockerAuthConfig(... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_run_test.go | pkg/container/docker_run_test.go | package container
import (
"bufio"
"bytes"
"context"
"fmt"
"io"
"net"
"strings"
"testing"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/nektos/act/pkg/common"
"github.com/stretchr/testify/assert"
"github.com/stre... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_socket_test.go | pkg/container/docker_socket_test.go | package container
import (
"os"
"testing"
log "github.com/sirupsen/logrus"
assert "github.com/stretchr/testify/assert"
)
func init() {
log.SetLevel(log.DebugLevel)
}
var originalCommonSocketLocations = CommonSocketLocations
func TestGetSocketAndHostWithSocket(t *testing.T) {
// Arrange
CommonSocketLocations... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/linux_container_environment_extensions.go | pkg/container/linux_container_environment_extensions.go | package container
import (
"context"
"path/filepath"
"regexp"
"runtime"
"strings"
log "github.com/sirupsen/logrus"
)
type LinuxContainerEnvironmentExtensions struct {
}
// Resolves the equivalent host path inside the container
// This is required for windows and WSL 2 to translate things like C:\Users\Myproje... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/parse_env_file.go | pkg/container/parse_env_file.go | package container
import (
"archive/tar"
"bufio"
"context"
"fmt"
"io"
"strings"
"github.com/nektos/act/pkg/common"
)
func parseEnvFile(e Container, srcPath string, env *map[string]string) common.Executor {
localEnv := *env
return func(ctx context.Context) error {
envTar, err := e.GetContainerArchive(ctx, ... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/host_environment.go | pkg/container/host_environment.go | package container
import (
"archive/tar"
"bytes"
"context"
"errors"
"fmt"
"io"
"io/fs"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/go-git/go-billy/v5/helper/polyfill"
"github.com/go-git/go-billy/v5/osfs"
"github.com/go-git/go-git/v5/plumbing/format/gitignore"
"golang.org/x/t... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_stub.go | pkg/container/docker_stub.go | //go:build WITHOUT_DOCKER || !(linux || darwin || windows || netbsd)
package container
import (
"context"
"runtime"
"github.com/docker/docker/api/types/system"
"github.com/nektos/act/pkg/common"
"github.com/pkg/errors"
)
// ImageExistsLocally returns a boolean indicating if an image with the
// requested name,... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/util.go | pkg/container/util.go | //go:build (!windows && !plan9 && !openbsd) || (!windows && !plan9 && !mips64)
package container
import (
"os"
"syscall"
"github.com/creack/pty"
)
func getSysProcAttr(_ string, tty bool) *syscall.SysProcAttr {
if tty {
return &syscall.SysProcAttr{
Setsid: true,
Setctty: true,
}
}
return &syscall.Sy... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_images_test.go | pkg/container/docker_images_test.go | package container
import (
"context"
"io"
"testing"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
func init() {
log.SetLevel(log.DebugLevel)
}
func TestImageExistsLocally(t *testing.T) {
if testing.Short(... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/executions_environment.go | pkg/container/executions_environment.go | package container
import "context"
type ExecutionsEnvironment interface {
Container
ToContainerPath(string) string
GetActPath() string
GetPathVariableName() string
DefaultPathVariable() string
JoinPathVariable(...string) string
GetRunnerContext(ctx context.Context) map[string]interface{}
// On windows PATH an... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_socket.go | pkg/container/docker_socket.go | package container
import (
"fmt"
"os"
"path/filepath"
"strings"
log "github.com/sirupsen/logrus"
)
var CommonSocketLocations = []string{
"/var/run/docker.sock",
"/run/podman/podman.sock",
"$HOME/.colima/docker.sock",
"$XDG_RUNTIME_DIR/docker.sock",
"$XDG_RUNTIME_DIR/podman/podman.sock",
`\\.\pipe\docker_e... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_run.go | pkg/container/docker_run.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"archive/tar"
"bytes"
"context"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"dario.cat/mergo"
"github.com/Masterminds/semver"
"github.com/docker/cli/cli/connhelper"
"... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/util_windows.go | pkg/container/util_windows.go | package container
import (
"errors"
"os"
"syscall"
)
func getSysProcAttr(cmdLine string, tty bool) *syscall.SysProcAttr {
return &syscall.SysProcAttr{CmdLine: cmdLine, CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP}
}
func openPty() (*os.File, *os.File, error) {
return nil, nil, errors.New("Unsupported")
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_cli.go | pkg/container/docker_cli.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
// This file is exact copy of https://github.com/docker/cli/blob/9ac8584acfd501c3f4da0e845e3a40ed15c85041/cli/command/container/opts.go
// appended with license information.
//
// docker/cli is licensed under the Apache License, Version 2.0.
// Se... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | true |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_pull_test.go | pkg/container/docker_pull_test.go | package container
import (
"context"
"testing"
"github.com/docker/cli/cli/config"
log "github.com/sirupsen/logrus"
assert "github.com/stretchr/testify/assert"
)
func init() {
log.SetLevel(log.DebugLevel)
}
func TestCleanImage(t *testing.T) {
tables := []struct {
imageIn string
imageOut string
}{
{"m... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/host_environment_test.go | pkg/container/host_environment_test.go | package container
import (
"archive/tar"
"context"
"io"
"os"
"path"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
// Type assert HostEnvironment implements ExecutionsEnvironment
var _ ExecutionsEnvironment = &HostEnvironment{}
func TestCopyDir(t *testing.T) {
dir, err := os.MkdirTemp("",... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_build.go | pkg/container/docker_build.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"context"
"io"
"os"
"path/filepath"
"github.com/docker/docker/api/types/build"
"github.com/moby/go-archive"
"github.com/moby/patternmatcher"
"github.com/moby/patternmatcher/ignorefile"
"github.com/nektos/act... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_logger.go | pkg/container/docker_logger.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"bufio"
"encoding/json"
"errors"
"io"
"github.com/sirupsen/logrus"
)
type dockerMessage struct {
ID string `json:"id"`
Stream string `json:"stream"`
Error string `json:"error"`
ErrorDetail... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/util_openbsd_mips64.go | pkg/container/util_openbsd_mips64.go | package container
import (
"errors"
"os"
"syscall"
)
func getSysProcAttr(cmdLine string, tty bool) *syscall.SysProcAttr {
return &syscall.SysProcAttr{
Setpgid: true,
}
}
func openPty() (*os.File, *os.File, error) {
return nil, nil, errors.New("Unsupported")
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/util_plan9.go | pkg/container/util_plan9.go | package container
import (
"errors"
"os"
"syscall"
)
func getSysProcAttr(cmdLine string, tty bool) *syscall.SysProcAttr {
return &syscall.SysProcAttr{
Rfork: syscall.RFNOTEG,
}
}
func openPty() (*os.File, *os.File, error) {
return nil, nil, errors.New("Unsupported")
}
| go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_images.go | pkg/container/docker_images.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"context"
"fmt"
cerrdefs "github.com/containerd/errdefs"
"github.com/docker/docker/api/types/image"
"github.com/nektos/act/pkg/common"
)
// ImageExistsLocally returns a boolean indicating if an image with the
// ... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/linux_container_environment_extensions_test.go | pkg/container/linux_container_environment_extensions_test.go | package container
import (
"fmt"
"os"
"runtime"
"strings"
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
func TestContainerPath(t *testing.T) {
type containerPathJob struct {
destinationPath string
sourcePath string
workDir string
}
linuxcontainerext :... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_cli_test.go | pkg/container/docker_cli_test.go | // This file is exact copy of https://github.com/docker/cli/blob/9ac8584acfd501c3f4da0e845e3a40ed15c85041/cli/command/container/opts_test.go with:
// * appended with license information
// * commented out case 'invalid-mixed-network-types' in test TestParseNetworkConfig
//
// docker/cli is licensed under the Apache Lic... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | true |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/container_types.go | pkg/container/container_types.go | package container
import (
"context"
"io"
"github.com/docker/go-connections/nat"
"github.com/nektos/act/pkg/common"
)
// NewContainerInput the input for the New function
type NewContainerInput struct {
Image string
Username string
Password string
Entrypoint []string
Cmd [... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/container/docker_network.go | pkg/container/docker_network.go | //go:build !(WITHOUT_DOCKER || !(linux || darwin || windows || netbsd))
package container
import (
"context"
"github.com/docker/docker/api/types/network"
"github.com/nektos/act/pkg/common"
)
func NewDockerNetworkCreateExecutor(name string) common.Executor {
return func(ctx context.Context) error {
cli, err :=... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/filecollector/file_collector.go | pkg/filecollector/file_collector.go | package filecollector
import (
"archive/tar"
"context"
"fmt"
"io"
"io/fs"
"os"
"path"
"path/filepath"
"strings"
git "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/filemode"
"github.com/go-git/go-git/v5/plumbing/format/gitignore"
"github.com/go-git/go-git/v5/plumbing/format/index"
)
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/filecollector/file_collector_test.go | pkg/filecollector/file_collector_test.go | package filecollector
import (
"archive/tar"
"context"
"io"
"path/filepath"
"strings"
"testing"
"github.com/go-git/go-billy/v5"
"github.com/go-git/go-billy/v5/memfs"
git "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/cache"
"github.com/go-git/go-git/v5/plumbing/format/gitignore"
"gith... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifactcache/storage.go | pkg/artifactcache/storage.go | package artifactcache
import (
"fmt"
"io"
"net/http"
"os"
"path/filepath"
)
type Storage struct {
rootDir string
}
func NewStorage(rootDir string) (*Storage, error) {
if err := os.MkdirAll(rootDir, 0o755); err != nil {
return nil, err
}
return &Storage{
rootDir: rootDir,
}, nil
}
func (s *Storage) Exi... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifactcache/handler_test.go | pkg/artifactcache/handler_test.go | package artifactcache
import (
"bytes"
"crypto/rand"
"encoding/json"
"fmt"
"io"
"net/http"
"path/filepath"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/timshannon/bolthold"
"go.etcd.io/bbolt"
)
func TestHandler(t *testing.T) {
dir :=... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifactcache/model.go | pkg/artifactcache/model.go | package artifactcache
type Request struct {
Key string `json:"key" `
Version string `json:"version"`
Size int64 `json:"cacheSize"`
}
func (c *Request) ToCache() *Cache {
if c == nil {
return nil
}
ret := &Cache{
Key: c.Key,
Version: c.Version,
Size: c.Size,
}
if c.Size == 0 {
// So th... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifactcache/handler.go | pkg/artifactcache/handler.go | package artifactcache
import (
"encoding/json"
"errors"
"fmt"
"io"
"net"
"net/http"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"sync/atomic"
"time"
"github.com/julienschmidt/httprouter"
"github.com/sirupsen/logrus"
"github.com/timshannon/bolthold"
"go.etcd.io/bbolt"
"github.com/nektos/act/pk... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifactcache/doc.go | pkg/artifactcache/doc.go | // Package artifactcache provides a cache handler for the runner.
//
// Inspired by https://github.com/sp-ricard-valverde/github-act-cache-server
//
// TODO: Authorization
// TODO: Restrictions for accessing a cache, see https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restr... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifacts/artifacts_v4.go | pkg/artifacts/artifacts_v4.go | // Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package artifacts
// GitHub Actions Artifacts V4 API Simple Description
//
// 1. Upload artifact
// 1.1. CreateArtifact
// Post: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact
// Request:
// {
// "workfl... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifacts/server_test.go | pkg/artifacts/server_test.go | package artifacts
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"os"
"path"
"path/filepath"
"strings"
"testing"
"testing/fstest"
"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/nektos/act/pkg/model"
"git... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifacts/artifact.pb.go | pkg/artifacts/artifact.pb.go | // Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc v4.25.2
// source: artifact.proto
package artifacts
import (
reflect "reflect"
sync "sync"
protoreflect "google.golan... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | true |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/artifacts/server.go | pkg/artifacts/server.go | package artifacts
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/fs"
"net/http"
"os"
"path/filepath"
"strings"
"time"
"github.com/julienschmidt/httprouter"
"github.com/nektos/act/pkg/common"
)
type FileContainerResourceURL struct {
FileContainerResourceURL string `json:"fileContainerResour... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/file.go | pkg/common/file.go | package common
import (
"fmt"
"io"
"os"
)
// CopyFile copy file
func CopyFile(source string, dest string) (err error) {
sourcefile, err := os.Open(source)
if err != nil {
return err
}
defer sourcefile.Close()
destfile, err := os.Create(dest)
if err != nil {
return err
}
defer destfile.Close()
_, e... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/executor_test.go | pkg/common/executor_test.go | package common
import (
"context"
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestNewWorkflow(t *testing.T) {
assert := assert.New(t)
ctx := context.Background()
// empty
emptyWorkflow := NewPipelineExecutor()
assert.Nil(emptyWorkflow(ctx))
// error case
errorWorkflow := NewErro... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/context_test.go | pkg/common/context_test.go | package common
import (
"context"
"os"
"syscall"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestGracefulJobCancellationViaSigint(t *testing.T) {
ctx, cancel, channel := createGracefulJobCancellationContext()
defer cancel()
assert.NotNil(t, ctx)
assert.NotNil(t, cancel)
assert.NotNil(t, c... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/outbound_ip.go | pkg/common/outbound_ip.go | package common
import (
"net"
"sort"
"strings"
)
// GetOutboundIP returns an outbound IP address of this machine.
// It tries to access the internet and returns the local IP address of the connection.
// If the machine cannot access the internet, it returns a preferred IP address from network interfaces.
// It ret... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/line_writer.go | pkg/common/line_writer.go | package common
import (
"bytes"
"io"
)
// LineHandler is a callback function for handling a line
type LineHandler func(line string) bool
type lineWriter struct {
buffer bytes.Buffer
handlers []LineHandler
}
// NewLineWriter creates a new instance of a line writer
func NewLineWriter(handlers ...LineHandler) io... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/cartesian_test.go | pkg/common/cartesian_test.go | package common
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCartesianProduct(t *testing.T) {
assert := assert.New(t)
input := map[string][]interface{}{
"foo": {1, 2, 3, 4},
"bar": {"a", "b", "c"},
"baz": {false, true},
}
output := CartesianProduct(input)
assert.Len(output, 24)
f... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/cartesian.go | pkg/common/cartesian.go | package common
// CartesianProduct takes map of lists and returns list of unique tuples
func CartesianProduct(mapOfLists map[string][]interface{}) []map[string]interface{} {
listNames := make([]string, 0)
lists := make([][]interface{}, 0)
for k, v := range mapOfLists {
listNames = append(listNames, k)
lists = a... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/line_writer_test.go | pkg/common/line_writer_test.go | package common
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLineWriter(t *testing.T) {
lines := make([]string, 0)
lineHandler := func(s string) bool {
lines = append(lines, s)
return true
}
lineWriter := NewLineWriter(lineHandler)
assert := assert.New(t)
write := func(s string) {
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/job_error.go | pkg/common/job_error.go | package common
import (
"context"
)
type jobErrorContextKey string
const jobErrorContextKeyVal = jobErrorContextKey("job.error")
type jobCancelCtx string
const JobCancelCtxVal = jobCancelCtx("job.cancel")
// JobError returns the job error for current context if any
func JobError(ctx context.Context) error {
val... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/auth.go | pkg/common/auth.go | // Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package common
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"time"
"github.com/golang-jwt/jwt/v5"
log "github.com/sirupsen/logrus"
)
type actionsClaims struct {
jwt.RegisteredClaims
Scp string `json:"scp"`
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/context.go | pkg/common/context.go | package common
import (
"context"
"os"
"os/signal"
"syscall"
)
func createGracefulJobCancellationContext() (context.Context, func(), chan os.Signal) {
ctx := context.Background()
ctx, forceCancel := context.WithCancel(ctx)
cancelCtx, cancel := context.WithCancel(ctx)
ctx = WithJobCancelContext(ctx, cancelCtx)... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/dryrun.go | pkg/common/dryrun.go | package common
import (
"context"
)
type dryrunContextKey string
const dryrunContextKeyVal = dryrunContextKey("dryrun")
// Dryrun returns true if the current context is dryrun
func Dryrun(ctx context.Context) bool {
val := ctx.Value(dryrunContextKeyVal)
if val != nil {
if dryrun, ok := val.(bool); ok {
retu... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/logger.go | pkg/common/logger.go | package common
import (
"context"
"github.com/sirupsen/logrus"
)
type loggerContextKey string
const loggerContextKeyVal = loggerContextKey("logrus.FieldLogger")
// Logger returns the appropriate logger for current context
func Logger(ctx context.Context) logrus.FieldLogger {
val := ctx.Value(loggerContextKeyVal... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/executor.go | pkg/common/executor.go | package common
import (
"context"
"errors"
"fmt"
log "github.com/sirupsen/logrus"
)
// Warning that implements `error` but safe to ignore
type Warning struct {
Message string
}
// Error the contract for error
func (w Warning) Error() string {
return w.Message
}
// Warningf create a warning
func Warningf(form... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/auth_test.go | pkg/common/auth_test.go | // Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package common
import (
"encoding/json"
"net/http"
"testing"
"github.com/golang-jwt/jwt/v5"
"github.com/stretchr/testify/assert"
)
func TestCreateAuthorizationToken(t *testing.T) {
var taskID int64 = 23
token, err := Cr... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/draw.go | pkg/common/draw.go | package common
import (
"fmt"
"io"
"os"
"strings"
)
// Style is a specific style
type Style int
// Styles
const (
StyleDoubleLine = iota
StyleSingleLine
StyleDashedLine
StyleNoLine
)
// NewPen creates a new pen
func NewPen(style Style, color int) *Pen {
bgcolor := 49
if os.Getenv("CLICOLOR") == "0" {
co... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/git/git.go | pkg/common/git/git.go | package git
import (
"context"
"errors"
"fmt"
"io"
"os"
"path"
"regexp"
"strings"
"sync"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/storer"
"github.com/go-git/go-git/v5/plumbing/transport/http"
"github.... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/common/git/git_test.go | pkg/common/git/git_test.go | package git
import (
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"syscall"
"testing"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/nektos/act/pkg/common"
)
func TestFindGitSlug(t *testing.T) {
assert := assert.New(t)
var slug... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/command_test.go | pkg/runner/command_test.go | package runner
import (
"bytes"
"context"
"io"
"os"
"testing"
"github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/model"
)
func TestSetEnv(t *testing.T) {
a := assert.New(t)
ctx := context.Background()
rc := new(RunCo... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/expression_test.go | pkg/runner/expression_test.go | package runner
import (
"context"
"fmt"
"os"
"regexp"
"sort"
"testing"
"github.com/nektos/act/pkg/exprparser"
"github.com/nektos/act/pkg/model"
assert "github.com/stretchr/testify/assert"
yaml "gopkg.in/yaml.v3"
)
func createRunContext(t *testing.T) *RunContext {
var yml yaml.Node
err := yml.Encode(map[s... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/action_cache.go | pkg/runner/action_cache.go | package runner
import (
"archive/tar"
"context"
"crypto/rand"
"encoding/hex"
"errors"
"fmt"
"io"
"io/fs"
"path"
"strings"
"time"
git "github.com/go-git/go-git/v5"
config "github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.co... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/action_cache_test.go | pkg/runner/action_cache_test.go | package runner
import (
"archive/tar"
"bytes"
"context"
"io"
"os"
"testing"
"github.com/stretchr/testify/assert"
)
//nolint:gosec
func TestActionCache(t *testing.T) {
a := assert.New(t)
cache := &GoGitActionCache{
Path: os.TempDir(),
}
ctx := context.Background()
cacheDir := "nektos/act-test-actions"
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/run_context.go | pkg/runner/run_context.go | package runner
import (
"archive/tar"
"bufio"
"bytes"
"context"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"time"
"github.com/docker/go-connections/nat"
"github.com/nektos/act/pkg/common"
"github.com... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | true |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/step_factory_test.go | pkg/runner/step_factory_test.go | package runner
import (
"testing"
"github.com/nektos/act/pkg/model"
"github.com/stretchr/testify/assert"
)
func TestStepFactoryNewStep(t *testing.T) {
table := []struct {
name string
model *model.Step
check func(s step) bool
}{
{
name: "StepRemoteAction",
model: &model.Step{
Uses: "remote/act... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/step_action_remote.go | pkg/runner/step_action_remote.go | package runner
import (
"archive/tar"
"context"
"errors"
"fmt"
"io"
"os"
"path"
"path/filepath"
"regexp"
"strings"
gogit "github.com/go-git/go-git/v5"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/common/git"
"github.com/nektos/act/pkg/model"
)
type stepActionRemote struct {
Step ... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/action_test.go | pkg/runner/action_test.go | package runner
import (
"context"
"io"
"io/fs"
"strings"
"testing"
"github.com/nektos/act/pkg/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
)
type closerMock struct {
mock.Mock
}
func (m *closerMock) Close() error {
m.Called()
return nil
}
func TestActionReader(t *testin... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/runner_test.go | pkg/runner/runner_test.go | package runner
import (
"bufio"
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"os"
"path"
"path/filepath"
"runtime"
"strings"
"testing"
"github.com/joho/godotenv"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
assert "github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
"github.com/... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/step_factory.go | pkg/runner/step_factory.go | package runner
import (
"fmt"
"github.com/nektos/act/pkg/model"
)
type stepFactory interface {
newStep(step *model.Step, rc *RunContext) (step, error)
}
type stepFactoryImpl struct{}
func (sf *stepFactoryImpl) newStep(stepModel *model.Step, rc *RunContext) (step, error) {
switch stepModel.Type() {
case model.... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/action_composite.go | pkg/runner/action_composite.go | package runner
import (
"context"
"fmt"
"regexp"
"strings"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/model"
)
func evaluateCompositeInputAndEnv(ctx context.Context, parent *RunContext, step actionStep) map[string]string {
env := make(map[string]string)
stepEnv := *step.getEnv()
for k, v ... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/action.go | pkg/runner/action.go | package runner
import (
"context"
"embed"
"errors"
"fmt"
"io"
"io/fs"
"os"
"path"
"path/filepath"
"regexp"
"runtime"
"strings"
"github.com/kballard/go-shellquote"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/container"
"github.com/nektos/act/pkg/model"
)
type actionStep interface {
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/local_repository_cache.go | pkg/runner/local_repository_cache.go | package runner
import (
"archive/tar"
"bytes"
"context"
"fmt"
"io"
"io/fs"
goURL "net/url"
"os"
"path/filepath"
"strings"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/filecollector"
)
type LocalRepositoryCache struct {
Parent ActionCache
LocalRepositories map[string]string
... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/step_run_test.go | pkg/runner/step_run_test.go | package runner
import (
"bytes"
"context"
"io"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/nektos/act/pkg/container"
"github.com/nektos/act/pkg/model"
)
func TestStepRun(t *testing.T) {
cm := &containerMock{}
fileEntry := &container.FileEntry{
Name: "wor... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
nektos/act | https://github.com/nektos/act/blob/d93106d194bba273d70d2ba604ea633c3f396b59/pkg/runner/step_action_local.go | pkg/runner/step_action_local.go | package runner
import (
"archive/tar"
"context"
"errors"
"fmt"
"io"
"io/fs"
"os"
"path"
"path/filepath"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/model"
)
type stepActionLocal struct {
Step *model.Step
RunContext *RunContext
compositeRunContext *RunContext
c... | go | MIT | d93106d194bba273d70d2ba604ea633c3f396b59 | 2026-01-07T08:35:43.481138Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.