Initial commit with support for GitHub actions

This commit is contained in:
Casey Lee
2019-01-12 20:45:25 -08:00
parent d136b830f2
commit f683af5954
33 changed files with 2941 additions and 1 deletions

34
main.go Normal file
View File

@@ -0,0 +1,34 @@
package main
import (
"context"
"os"
"os/signal"
"github.com/nektos/act/cmd"
)
var version string
func main() {
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
// trap Ctrl+C and call cancel on the context
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
defer func() {
signal.Stop(c)
cancel()
}()
go func() {
select {
case <-c:
cancel()
case <-ctx.Done():
}
}()
// run the command
cmd.Execute(ctx, version)
}