-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
160 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- run: buf generate | ||
working-directory: proto | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
@@ -28,6 +25,8 @@ jobs: | |
cache-dependency-path: "frontend/extension/pnpm-lock.yaml" | ||
- run: pnpm install | ||
working-directory: frontend/extension | ||
- run: pnpm type-gen | ||
working-directory: frontend/extension | ||
- name: Run eslint check | ||
run: pnpm lint | ||
working-directory: frontend/extension | ||
|
@@ -36,9 +35,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- run: buf generate | ||
working-directory: proto | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
@@ -49,6 +45,8 @@ jobs: | |
cache-dependency-path: "frontend/extension/pnpm-lock.yaml" | ||
- run: pnpm install | ||
working-directory: frontend/extension | ||
- run: pnpm type-gen | ||
working-directory: frontend/extension | ||
- name: Run extension build | ||
run: pnpm build | ||
working-directory: frontend/extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- run: buf generate | ||
working-directory: proto | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
@@ -28,6 +25,8 @@ jobs: | |
cache-dependency-path: "frontend/web/pnpm-lock.yaml" | ||
- run: pnpm install | ||
working-directory: frontend/web | ||
- run: pnpm type-gen | ||
working-directory: frontend/web | ||
- name: Run eslint check | ||
run: pnpm lint | ||
working-directory: frontend/web | ||
|
@@ -36,9 +35,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- run: buf generate | ||
working-directory: proto | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
@@ -49,6 +45,8 @@ jobs: | |
cache-dependency-path: "frontend/web/pnpm-lock.yaml" | ||
- run: pnpm install | ||
working-directory: frontend/web | ||
- run: pnpm type-gen | ||
working-directory: frontend/web | ||
- name: Run frontend build | ||
run: pnpm build | ||
working-directory: frontend/web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,12 @@ | ||
# Build protobuf. | ||
FROM golang:1.21-alpine AS protobuf | ||
WORKDIR /protobuf-generate | ||
|
||
COPY . . | ||
|
||
RUN GO111MODULE=on GOBIN=/usr/local/bin go install github.com/bufbuild/buf/cmd/[email protected] | ||
|
||
WORKDIR /protobuf-generate/proto | ||
|
||
RUN buf generate | ||
|
||
# Build frontend dist. | ||
FROM node:18-alpine AS frontend | ||
WORKDIR /frontend-build | ||
|
||
COPY ./frontend . | ||
|
||
COPY --from=protobuf /protobuf-generate/frontend/web/src/types/proto ./web/src/types/proto | ||
COPY . . | ||
|
||
WORKDIR /frontend-build/web | ||
WORKDIR /frontend-build/frontend/web | ||
|
||
RUN corepack enable && pnpm i --frozen-lockfile | ||
RUN corepack enable && pnpm i --frozen-lockfile && pnpm type-gen | ||
|
||
RUN pnpm build | ||
|
||
|
@@ -29,7 +15,7 @@ FROM golang:1.21-alpine AS backend | |
WORKDIR /backend-build | ||
|
||
COPY . . | ||
COPY --from=frontend /frontend-build/web/dist ./server/dist | ||
COPY --from=frontend /frontend-build/frontend/web/dist ./server/dist | ||
|
||
RUN CGO_ENABLED=0 go build -o slash ./bin/slash/main.go | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.