diff --git a/Dockerfile b/Dockerfile index 4fa74dd..e5a1a95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN go mod tidy RUN CGO_ENABLED=0 go build -o app . FROM alpine:3.14 -LABEL org.opencontainers.image.source=https://github.com/trstringer/manual-approval +LABEL org.opencontainers.image.source=https://github.com/snskarora/manual-approval RUN apk update && apk add ca-certificates COPY --from=builder /var/app/app /var/app/app CMD ["/var/app/app"] diff --git a/approval.go b/approval.go index 2b7baa1..6391ad2 100644 --- a/approval.go +++ b/approval.go @@ -127,11 +127,13 @@ func (a *approvalEnvironment) SetActionOutputs(outputs map[string]string) (bool, } f, err := os.OpenFile(outputFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) - if err != nil { return false, err } - defer f.Close() + + defer func() { + _ = f.Close() // Error explicitly ignored as there is nothing to handle if file close fails. + }() var pairs []string diff --git a/approval_test.go b/approval_test.go index efddf7f..0a0d923 100644 --- a/approval_test.go +++ b/approval_test.go @@ -467,7 +467,7 @@ func TestSaveOutput(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { - os.Setenv("GITHUB_OUTPUT", testCase.env_github_output) + t.Setenv("GITHUB_OUTPUT", testCase.env_github_output) a := approvalEnvironment{ client: nil, repoFullName: "",