Skip to content

支持配置SwaggerDoc界面是否显示 #80

支持配置SwaggerDoc界面是否显示

支持配置SwaggerDoc界面是否显示 #80

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get versions
id: version
run: |
echo "::set-output name=major::$(awk -F, '{print $2}' .tags)"
echo "::set-output name=full::$(awk -F, '{print $1}' .tags)"
- name: Setup Node.js v14.x
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
working-directory: ./ui
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn Install
run: yarn install --frozen-lockfile
working-directory: ./ui
#- uses: actions/cache@v3
# with:
# # 缓存文件夹
# path: ui/node_modules/.cache/webpack/
# key: ${{ github.ref.name }}-webpack-build
# # 兜底使用 "main" 分支缓存
# restore-keys: |
# main-webpack-build
- name: Build UI
working-directory: ./ui
run: yarn build && rsync -a dist/* ../GBWeb/wwwroot/
- name: Docker Setup qemu-action
uses: docker/setup-qemu-action@v1
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v1
- name: DockerHub Login
uses: docker/[email protected]
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./GBWeb/Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
vanjoge/gbsip:latest