Skip to content

Commit df921da

Browse files
authored
Fix CI build, update Makefile (#232)
* fix ci build, update Makefile * fix ci build, update Makefile * update docker image action * update docker file * update github actions * update README
1 parent 7af6309 commit df921da

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Build and push the docker image
3333
uses: docker/build-push-action@v3
3434
with:
35-
platforms: linux/amd64,linux/arm64,linux/arm/v7
35+
platforms: linux/amd64,linux/arm64
3636
push: true
3737
tags: |
3838
timothyye/godns:latest

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
name: Build the frontend project
2424
run: |
2525
cd web
26-
npm install
26+
npm ci
2727
npm run build
2828
cd ..
2929
go generate ./...

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
before:
44
hooks:
55
# build the frontend project
6-
- npm install --prefix ./web
6+
- npm ci --prefix ./web
77
- npm run build --prefix ./web
88
# You may remove this if you don't use go modules.
99
- go mod tidy

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WORKDIR /web
44
# Copy the Next.js project files into the image
55
COPY ./web/package.json ./web/package-lock.json ./
66
# Install dependencies
7-
RUN npm install
7+
RUN npm ci
88
# Copy the rest of the Next.js project files
99
COPY ./web .
1010
# Build the Next.js project

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
BINARY=godns
33
# Builds the project
44
build:
5+
npm ci --prefix ./web
6+
npm run build --prefix ./web
7+
go generate ./...
58
GO111MODULE=on go build -ldflags "-X main.Version=${VERSION}" -o ${BINARY} cmd/godns/godns.go
69
# Installs our project: copies binaries
710
install:

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,11 +1195,15 @@ Contributions are welcome! Please feel free to submit a Pull Request.
11951195

11961196
### Setup the frontend development environment
11971197

1198+
Requirements:
1199+
* Node.js `18.19.0` or higher
1200+
* Go `1.17` or higher
1201+
11981202
The frontend project is built with [Next.js](https://nextjs.org/) and [daisyUI](https://daisyui.com/). To start the development environment, run:
11991203

12001204
```bash
12011205
cd web
1202-
npm install
1206+
npm ci
12031207
npm run dev
12041208
```
12051209
### Build the frontend

0 commit comments

Comments
 (0)