Skip to content

fix: 修复了chatgpt 因接口变动, token异常的问题 #9

fix: 修复了chatgpt 因接口变动, token异常的问题

fix: 修复了chatgpt 因接口变动, token异常的问题 #9

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
APP_NAME: zihjiang/chatgpt-web
DOCKERHUB_REPO: zihjiang/chatgpt-web
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run build --if-present
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate App Version
run: echo APP_VERSION=`echo $GITHUB_REF_NAME|sed -e "s/releases\///g"` >> $GITHUB_ENV
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
build-args: |
APP_VERSION=${{ env.APP_VERSION }}
APP_VERSION=${{ env.APP_NAME }}
push: true
tags: |
${{ env.APP_NAME }}:latest
${{ env.APP_NAME }}:${{ env.APP_VERSION }}