diff --git a/act/runner/run_context.go b/act/runner/run_context.go index b7e7a171..40a65f22 100755 --- a/act/runner/run_context.go +++ b/act/runner/run_context.go @@ -17,6 +17,8 @@ import ( "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" + selinux "github.com/opencontainers/selinux/go-selinux" + "github.com/nektos/act/pkg/common" "github.com/nektos/act/pkg/container" "github.com/nektos/act/pkg/model" @@ -90,6 +92,9 @@ func (rc *RunContext) GetBindsAndMounts() ([]string, map[string]string) { if runtime.GOOS == "darwin" { bindModifiers = ":delegated" } + if selinux.GetEnabled() { + bindModifiers = ":z" + } binds = append(binds, fmt.Sprintf("%s:%s%s", rc.Config.Workdir, rc.Config.ContainerWorkdir(), bindModifiers)) } else { mounts[name] = rc.Config.ContainerWorkdir()