Skip to content

Fixed Docker Hub access error message, simplified error message handl… #115

Fixed Docker Hub access error message, simplified error message handl…

Fixed Docker Hub access error message, simplified error message handl… #115

name: alpha prerelease CI
on:
# 手动触发事件
# workflow_dispatch:
# inputs:
# logLevel:
# description: 'Log level'
# required: true
# default: 'main build'
# tags:
# description: 'Tags'
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.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 }}
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9.12.2
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: '缓存 Cache'
uses: actions/cache@v3
id: cache-dependencies
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: '读取当前版本号 Read the current version number'
id: version
uses: zhanghengxin/reading-a-file-of-JSON@ice
with:
path: ./package.json
property:
version
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: '输出 echo artifact'
run: |
echo ${{ steps.version.outputs.value }}
echo github ${{ github }}
echo github.sha ${{ github.sha }}
echo env.VERSION ${{ steps.get_version.outputs.VERSION }}
- run: pnpm install
- run: pnpm build
- run: |
tar -zcvf linux-all-icewhale-app-ui-${{ steps.get_version.outputs.VERSION }}.tar.gz build
- name: '更新 Update release'
uses: zhanghengxin/git-release-private@ice
with:
token: ${{ secrets.GITHUB_TOKEN }}
allow_override: true
gzip: false
prerelease: true
tag: ${{ steps.get_version.outputs.VERSION }}
files: ./linux-all-icewhale-app-ui-${{ steps.get_version.outputs.VERSION }}.tar.gz
- name: Upload to oss
id: upload_to_oss
uses: tvrcgo/upload-to-oss@master
with:
key-id: ${{ secrets.OSS_KEY_ID }}
key-secret: ${{ secrets.OSS_KEY_SECRET }}
region: oss-cn-shanghai
bucket: casaos
assets: |
./linux-all-icewhale-app-ui-${{ steps.get_version.outputs.VERSION }}.tar.gz:/IceWhaleTech/IceWhale-App-UI/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-all-icewhale-app-ui-${{ steps.get_version.outputs.VERSION }}.tar.gz