forked from feixuei/chatgpt-mirror-server
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (33 loc) · 930 Bytes
/
docker_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: 自动构建发布
on:
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
REMOTE_CONTAINERS: "true"
steps:
- name: 代码拉取
uses: actions/checkout@v2
- name: 初始化环境
run: |
chmod +x ./.devcontainer/scripts/init.sh
./.devcontainer/scripts/init.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: 登录到docker
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Release
run: |
chmod +x ./release.sh
./release.sh
- name: Cache node modules
uses: actions/cache@v2
with:
path: frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-