From 6af0ecec33c3ac3f0c633067e8f72683bd90a739 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Wed, 14 Sep 2022 23:34:45 +0200 Subject: [PATCH] with lots of repos --- _examples/actions/write_a_readme/kraken.yml | 26 +++++++++++++++++++++ internal/actions/action.go | 7 +++++- internal/actions/builders/go.go | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/_examples/actions/write_a_readme/kraken.yml b/_examples/actions/write_a_readme/kraken.yml index d37ca53..e3168f1 100644 --- a/_examples/actions/write_a_readme/kraken.yml +++ b/_examples/actions/write_a_readme/kraken.yml @@ -3,6 +3,32 @@ name: write-a-readme select: repositories: - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + - git@git.front.kjuulh.io:kjuulh/kraken-test.git providers: - gitea: git.front.kjuulh.io/kraken organisation: "kraken" diff --git a/internal/actions/action.go b/internal/actions/action.go index 277b790..3c6416e 100644 --- a/internal/actions/action.go +++ b/internal/actions/action.go @@ -23,7 +23,12 @@ func (a *Action) Execute(ctx context.Context, area *storage.Area) error { if err != nil { return err } - exe(ctx, area.Path) + err = exe(ctx, area.Path) + if err != nil { + return err + } + + zap.L().Debug("Execution done") default: return errors.New("could not determine action type") diff --git a/internal/actions/builders/go.go b/internal/actions/builders/go.go index 508eb94..6d828ee 100644 --- a/internal/actions/builders/go.go +++ b/internal/actions/builders/go.go @@ -41,6 +41,6 @@ func (g *Go) Build(ctx context.Context, modulePath, entryPath string) (GoExecuta return func(ctx context.Context, victimPath string) error { g.logger.Debug("Executing script", zap.String("victim", victimPath)) - return exec.CommandContext(ctx, fmt.Sprintf("(cd %s; %s/main)", victimPath, modulePath)).Run() + return exec.CommandContext(ctx, "/bin/bash", "-c", fmt.Sprintf("(cd %s; %s/main)", victimPath, modulePath)).Run() }, nil }