Skip to content

Commit

Permalink
Merge pull request #113 from shadowmere-xyz/fix-ci-gomod
Browse files Browse the repository at this point in the history
Add extra go mod tidy before build
  • Loading branch information
jadolg authored Sep 21, 2024
2 parents 500defd + 00d73dc commit c6f085f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
go-version-file: go.mod

- name: Build
run: go build -v ./...
run: |
go mod tidy
go build -v ./...
- name: Test
run: make test
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM golang:1.23 as build

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / build and push Docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / build and push Docker image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

ADD . /app
WORKDIR /app

COPY go.mod go.sum .
RUN go mod download

ADD . /app

RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux go build

FROM alpine:3.20
Expand Down

0 comments on commit c6f085f

Please sign in to comment.