LInting
This commit is contained in:
parent
ddafc41052
commit
3c5f87687d
3 changed files with 6 additions and 4 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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: "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue