diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ddb1d0d..1471e95 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,6 +21,7 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v1 + if: startsWith(github.ref, 'refs/tags/') with: version: latest args: release diff --git a/main.go b/main.go index d0c3e6c..d1e5bca 100644 --- a/main.go +++ b/main.go @@ -165,11 +165,14 @@ func run(ctx context.Context, provider secrets.Provider, commandSlice []string) if sig != syscall.SIGCHLD { // forward signal to the main process and its children e := syscall.Kill(-cmd.Process.Pid, sig.(syscall.Signal)) - log.WithFields(log.Fields{ - "pid": cmd.Process.Pid, - "path": cmd.Path, - "args": cmd.Args, - }).WithError(e).Error("failed to kill process") + if e != nil { + log.WithFields(log.Fields{ + "pid": cmd.Process.Pid, + "path": cmd.Path, + "args": cmd.Args, + "signal": sig, + }).WithError(e).Error("failed to send system signal to the process") + } } } }()