CI pipeline
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Malachy Byrne 2025-03-31 01:13:23 +01:00
parent bae23a4712
commit 8776953b54
Signed by: malmal200
GPG Key ID: EC21443030A655D9
3 changed files with 18 additions and 4 deletions

View File

@ -1,9 +1,9 @@
kind: pipeline
type: docker
name: default
steps:
- name: test
image: golang
image: golang:1.23
commands:
- go test
- go build
- go test ./...

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM golang:1.23
LABEL authors="malmal200"
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY dice/*.go ./dice/
COPY application/*.go ./application/
RUN CGO_ENABLED=0 GOOS=linux go build -o /go-bot ./application
ENTRYPOINT ["/go-bot"]

View File

@ -78,7 +78,7 @@ func roll(opts optionMap) string {
if err != nil {
return fmt.Sprintf("Error rolling dice: %s", err)
}
total := 0
total := d.Add
for i, die := range roll {
_, err = fmt.Fprintf(&ret, "%v", die.Result)
if err != nil {