Skip to content

Commit

Permalink
Fix CI build, update Makefile (#232)
Browse files Browse the repository at this point in the history
* fix ci build, update Makefile

* fix ci build, update Makefile

* update docker image action

* update docker file

* update github actions

* update README
  • Loading branch information
TimothyYe authored Feb 17, 2024
1 parent 7af6309 commit df921da
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build and push the docker image
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
push: true
tags: |
timothyye/godns:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
name: Build the frontend project
run: |
cd web
npm install
npm ci
npm run build
cd ..
go generate ./...
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
before:
hooks:
# build the frontend project
- npm install --prefix ./web
- npm ci --prefix ./web
- npm run build --prefix ./web
# You may remove this if you don't use go modules.
- go mod tidy
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /web
# Copy the Next.js project files into the image
COPY ./web/package.json ./web/package-lock.json ./
# Install dependencies
RUN npm install
RUN npm ci
# Copy the rest of the Next.js project files
COPY ./web .
# Build the Next.js project
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
BINARY=godns
# Builds the project
build:
npm ci --prefix ./web
npm run build --prefix ./web
go generate ./...
GO111MODULE=on go build -ldflags "-X main.Version=${VERSION}" -o ${BINARY} cmd/godns/godns.go
# Installs our project: copies binaries
install:
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1195,11 +1195,15 @@ Contributions are welcome! Please feel free to submit a Pull Request.

### Setup the frontend development environment

Requirements:
* Node.js `18.19.0` or higher
* Go `1.17` or higher

The frontend project is built with [Next.js](https://nextjs.org/) and [daisyUI](https://daisyui.com/). To start the development environment, run:

```bash
cd web
npm install
npm ci
npm run dev
```
### Build the frontend
Expand Down

0 comments on commit df921da

Please sign in to comment.