Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
weaigc committed Aug 29, 2023
2 parents f540c82 + ba23fb8 commit 81d3363
Show file tree
Hide file tree
Showing 48 changed files with 2,190 additions and 391 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/coverage

# next.js
/.next/
/out/

# production
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Docker Image Multi-Platform

on:
push:
branches:
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- run: |
npm install
npm run build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: weaigc/bingo:latest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Sync to Hugging Face hub
name: Sync to Hugging Face hub x64
on:
workflow_run:
workflows: ["Build Docker Image"]
workflows: ["Build Docker Image Multi-Platform"]
types:
- completed

Expand All @@ -22,5 +22,7 @@ jobs:
cd huggingface
git config user.name hf4all
git config user.email hf4all@gmail.com
git commit -am "auto build" --amend
echo "Last deploy time: $(date)" > DEPLOY_INFO.txt
git add DEPLOY_INFO.txt
git commit -am "auto deploy $(date)"
git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main -f
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM node:18

FROM node:16

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -23,14 +22,17 @@ WORKDIR $HOME/app
# where available (npm@5+)
COPY --chown=user package*.json $HOME/app/

RUN npm install
COPY --chown=user .next $HOME/app/

RUN npm install --verbose

# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app/
#COPY --chown=user . $HOME/app/

RUN npm run build
#RUN npm run build && rm -rf src

ENV PORT 7860

EXPOSE 7860

CMD npm start
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
---
title: bingo
emoji: 📉
colorFrom: red
colorTo: red
sdk: docker
pinned: true
license: mit
---

<div align="center">

# Bingo
Expand Down Expand Up @@ -50,8 +40,8 @@ https://bing.github1s.tk
- [x] 支持图片输入
- [x] 支持自定义域名
- [x] 支持离线访问
- [x] 适配深色模式
- [ ] 支持历史记录
- [ ] 适配深色模式
- [ ] 支持内置提示词
- [ ] 国际化翻译

Expand Down
26 changes: 24 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bingo",
"version": "0.5.0",
"version": "0.6.0",
"private": true,
"scripts": {
"dev": "cross-env DEBUG=bingo* next dev --hostname 0.0.0.0",
Expand All @@ -22,6 +22,7 @@
"cheerio": "^1.0.0-rc.12",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"dayjs": "^1.11.9",
"debug": "^4.3.4",
"dotenv": "^16.3.1",
"eslint": "8.44.0",
Expand All @@ -41,6 +42,7 @@
"js-base64": "^3.7.5",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"namestorage": "^1.3.0",
"nanoid": "^4.0.2",
"next": "13.4.9",
"next-auth": "^4.22.3",
Expand All @@ -52,6 +54,7 @@
"react-hot-toast": "^2.4.1",
"react-intersection-observer": "^9.5.2",
"react-markdown": "^8.0.7",
"react-spinners": "^0.13.8",
"react-syntax-highlighter": "^15.5.0",
"react-textarea-autosize": "^8.5.0",
"react-viewport-list": "^7.1.1",
Expand Down
File renamed without changes
Loading

0 comments on commit 81d3363

Please sign in to comment.