feat: update workflow and docker
This commit is contained in:
parent
c6f6242dd2
commit
88636c8f0e
6 changed files with 58 additions and 10 deletions
28
.github/workflows/build-linux.yml
vendored
28
.github/workflows/build-linux.yml
vendored
|
|
@ -5,17 +5,32 @@ on:
|
||||||
inputs:
|
inputs:
|
||||||
tags:
|
tags:
|
||||||
description: "Version tags"
|
description: "Version tags"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
container:
|
container:
|
||||||
image: sjzsdu/yao-build:0.10.4
|
image: sjzsdu/yao-build:0.10.4
|
||||||
|
options: --privileged
|
||||||
|
volumes:
|
||||||
|
- /data:/data
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GO111MODULE: on
|
||||||
|
GOPROXY: https://goproxy.cn,direct
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: /app/yao
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
export PATH=$PATH:/github/home/go/bin
|
export PATH=$PATH:/github/home/go/bin
|
||||||
|
cd /app
|
||||||
/app/build.sh
|
/app/build.sh
|
||||||
ls -l /data
|
ls -l /data
|
||||||
|
|
||||||
|
|
@ -25,3 +40,16 @@ jobs:
|
||||||
name: yao-linux
|
name: yao-linux
|
||||||
path: |
|
path: |
|
||||||
/data/*
|
/data/*
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: success()
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.event.inputs.tags }}
|
||||||
|
name: Release ${{ github.event.inputs.tags }}
|
||||||
|
files: /data/*
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
11
.github/workflows/build-macos.yml
vendored
11
.github/workflows/build-macos.yml
vendored
|
|
@ -125,3 +125,14 @@ jobs:
|
||||||
name: yao-macos
|
name: yao-macos
|
||||||
path: |
|
path: |
|
||||||
dist/release/*
|
dist/release/*
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
|
name: Release v${{ env.VERSION }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
files: dist/release/*
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
## Install Yao
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -sSL https://github.com/sjzsdu/yao/raw/master/get-wn.sh | bash
|
||||||
|
```
|
||||||
|
|
||||||
## What is Yao?
|
## What is Yao?
|
||||||
|
|
||||||
Yao is an all-in-one application engine that enables developers to create web apps, REST APIs, business applications, and more, with AI as a development partner.
|
Yao is an all-in-one application engine that enables developers to create web apps, REST APIs, business applications, and more, with AI as a development partner.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,11 @@
|
||||||
# Yao
|
# Yao
|
||||||
|
|
||||||
|
## 安装 Yao
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -sSL https://github.com/sjzsdu/yao/raw/master/get-wn.sh | bash
|
||||||
|
```
|
||||||
|
|
||||||
[](https://github.com/YaoApp/yao/actions/workflows/unit-test.yml)
|
[](https://github.com/YaoApp/yao/actions/workflows/unit-test.yml)
|
||||||
[](https://codecov.io/gh/YaoApp/yao)
|
[](https://codecov.io/gh/YaoApp/yao)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,15 +40,6 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
# Install AWS CLI
|
|
||||||
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
|
||||||
unzip awscliv2.zip && \
|
|
||||||
./aws/install && \
|
|
||||||
rm -rf awscliv2.zip && \
|
|
||||||
rm -rf aws && \
|
|
||||||
aws --version
|
|
||||||
|
|
||||||
# RUN npm install -g pnpm
|
|
||||||
RUN chmod +x /app/build.sh
|
RUN chmod +x /app/build.sh
|
||||||
|
|
||||||
VOLUME [ "/data" ]
|
VOLUME [ "/data" ]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# 确保目录存在并设置权限
|
||||||
|
mkdir -p /data
|
||||||
|
chmod 777 /data
|
||||||
|
|
||||||
cd /app && \
|
cd /app && \
|
||||||
git clone https://github.com/yaoapp/kun.git /app/kun && \
|
git clone https://github.com/yaoapp/kun.git /app/kun && \
|
||||||
git clone https://github.com/yaoapp/xun.git /app/xun && \
|
git clone https://github.com/yaoapp/xun.git /app/xun && \
|
||||||
|
|
@ -22,4 +28,4 @@ cd /app/yao && \
|
||||||
export VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g")
|
export VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g")
|
||||||
|
|
||||||
cd /app/yao && make tools && make artifacts-linux
|
cd /app/yao && make tools && make artifacts-linux
|
||||||
mv /app/yao/dist/release/* /data/%
|
mv /app/yao/dist/release/* /data/
|
||||||
Loading…
Add table
Reference in a new issue