Skip to content

fix: docker

fix: docker #42

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
jobs:
release:
runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [18.x, 20.x]
steps:
- name: Checkout Source Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js Environment (use node 18)
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Cache Dependences
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# 需要缓存的文件的路径
path: ./node_modules
# 对缓存的文件指定的唯一标识
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package.json') }}
# 用于没有再找目标key的缓存的backup选项
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Init Project
run: npm run initial
- name: Build Project
run: npm run build
- name: Release Docker Image
run: |
chmod +x ./release.sh
DOCKER_REPO=${{ secrets.DOCKER_REPO }} DOCKER_USER=${{ secrets.DOCKER_USER }} DOCKER_PASS=${{ secrets.DOCKER_PASS }} ./release.sh