mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-12-23 21:14:41 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a77548b23 | ||
|
|
15ccade3d3 | ||
|
|
587fb6fb8a | ||
|
|
5bcb663ac8 | ||
|
|
cbd945536d | ||
|
|
081e9213c2 | ||
|
|
966fae2d4c | ||
|
|
dc4f9ea990 | ||
|
|
05b9c75714 | ||
|
|
4aeeea2325 | ||
|
|
72531cf6c2 | ||
|
|
9ad9be8c61 | ||
|
|
1aa15932a0 | ||
|
|
dbc6a4265a | ||
|
|
edea1f144a | ||
|
|
85c59c03cf | ||
|
|
a1f57bf1d1 | ||
|
|
e6f2c46c28 | ||
|
|
55c6c21aa3 |
162
.github/workflows/casa.yml
vendored
162
.github/workflows/casa.yml
vendored
@@ -3,10 +3,20 @@
|
|||||||
name: Build CasaOS
|
name: Build CasaOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
repository_dispatch:
|
||||||
types:
|
workflow_dispatch:
|
||||||
- created
|
inputs:
|
||||||
|
ssh:
|
||||||
|
description: 'SSH connection to Actions'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
|
||||||
|
#on:
|
||||||
|
# push:
|
||||||
|
# branches:
|
||||||
|
# - 'main'
|
||||||
|
# tags:
|
||||||
|
# - 'v*'
|
||||||
env:
|
env:
|
||||||
REPO_URL: https://github.com/IceWhaleTech/CasaOS.git
|
REPO_URL: https://github.com/IceWhaleTech/CasaOS.git
|
||||||
REPO_BRANCH: main
|
REPO_BRANCH: main
|
||||||
@@ -24,79 +34,121 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Get release
|
# - name: Get release
|
||||||
id: get_release
|
# id: get_release
|
||||||
uses: bruceadams/get-release@v1.2.3
|
# uses: bruceadams/get-release@v1.2.3
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
# GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
- name: Initialization environment
|
- uses: actions/checkout@v2
|
||||||
env:
|
with:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
fetch-depth: 0
|
||||||
run: |
|
submodules: true
|
||||||
sudo timedatectl set-timezone "$TZ"
|
# - name: Initialization environment
|
||||||
sudo mkdir -p /workdir
|
# env:
|
||||||
sudo chown $USER:$GROUPS /workdir
|
# DEBIAN_FRONTEND: noninteractive
|
||||||
|
# run: |
|
||||||
|
# sudo timedatectl set-timezone "$TZ"
|
||||||
|
# sudo mkdir -p /workdir
|
||||||
|
# sudo chown $USER:$GROUPS /workdir
|
||||||
|
|
||||||
- name: Clone source code
|
|
||||||
working-directory: /workdir
|
|
||||||
|
|
||||||
|
|
||||||
|
# - name: Clone source code
|
||||||
|
# working-directory: /workdir
|
||||||
|
# run: |
|
||||||
|
# df -hT $PWD
|
||||||
|
# git clone $REPO_URL -b $REPO_BRANCH --recursive casa
|
||||||
|
# ln -sf /workdir/casa $GITHUB_WORKSPACE/casa
|
||||||
|
# ls
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set enviroment for github-release
|
||||||
run: |
|
run: |
|
||||||
df -hT $PWD
|
echo "VERSION=$(cat types/system.go | grep CURRENTVERSION | awk '$2 == "CURRENTVERSION"{print $4}' | sed 's/"//g')" >>$GITHUB_ENV
|
||||||
git clone $REPO_URL -b $REPO_BRANCH --recursive casa
|
echo "BODY=$(cat types/system.go | grep BODY | awk -F= '{print $2}' | sed 's/"//g')" >>$GITHUB_ENV
|
||||||
ln -sf /workdir/casa $GITHUB_WORKSPACE/casa
|
|
||||||
ls
|
|
||||||
|
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Build frontend with nodejs and yarn
|
# - name: Build frontend with nodejs and yarn
|
||||||
run: |
|
# run: |
|
||||||
cd casa/UI
|
# cd casa/UI
|
||||||
ls
|
# ls
|
||||||
yarn install
|
# yarn install
|
||||||
yarn build
|
# yarn build
|
||||||
|
|
||||||
- name: Build with xgo
|
- name: list work
|
||||||
uses: crazy-max/ghaction-xgo@v1
|
run: pwd
|
||||||
with:
|
|
||||||
working_dir: /workdir/casa
|
# - name: Build with xgo
|
||||||
xgo_version: latest
|
# uses: crazy-max/ghaction-xgo@v1
|
||||||
go_version: ${{ matrix.go_version }}
|
# with:
|
||||||
dest: build
|
# xgo_version: latest
|
||||||
prefix: casa
|
# go_version: ${{ matrix.go_version }}
|
||||||
targets: linux/amd64,linux/arm64
|
# dest: build
|
||||||
v: true
|
# prefix: casa
|
||||||
x: false
|
# targets: linux/amd64,linux/arm64
|
||||||
race: false
|
# v: true
|
||||||
ldflags: -s -w
|
# x: false
|
||||||
buildmode: default
|
# race: false
|
||||||
|
# ldflags: -s -w
|
||||||
|
# buildmode: default
|
||||||
|
|
||||||
- name: List Files
|
- name: List Files
|
||||||
run: |
|
run: |
|
||||||
ls
|
ls
|
||||||
cd casa/build
|
mkdir build
|
||||||
|
cd build
|
||||||
|
touch casa-linux-amd64
|
||||||
|
touch casa-linux-arm64
|
||||||
ls
|
ls
|
||||||
echo "::set-output name=status::success"
|
echo "::set-output name=status::success"
|
||||||
|
|
||||||
- name: Pack builds
|
- name: Pack builds
|
||||||
run: |
|
run: |
|
||||||
cd /workdir
|
|
||||||
wget $PACK_SH_URL
|
wget $PACK_SH_URL
|
||||||
chmod +x $PACK_SH
|
chmod +x $PACK_SH
|
||||||
./$PACK_SH
|
./$PACK_SH
|
||||||
echo "::set-output name=status::success"
|
echo "::set-output name=status::success"
|
||||||
|
- name: list work
|
||||||
|
run: ls
|
||||||
|
|
||||||
- name: Upload linux-amd64-casaos.tar.gz
|
# - name: move
|
||||||
id: upload_assets_amd64
|
# run: |
|
||||||
uses: shogo82148/actions-upload-release-asset@v1
|
# ls
|
||||||
|
# mv /workdir/casa/upload/linux-amd64-casaos.tar.gz ./linux-amd64-casaos.tar.gz
|
||||||
|
# mv /workdir/casa/upload/linux-arm64-casaos.tar.gz ./linux-arm64-casaos.tar.gz
|
||||||
|
- name: Update release
|
||||||
|
uses: meeDamian/github-release@2.0
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
asset_path: /workdir/casa/upload/linux-amd64-casaos.tar.gz
|
files: >
|
||||||
|
linux-amd64-casaos.tar.gz
|
||||||
- name: Upload linux-arm64-casaos.tar.gz
|
linux-arm64-casaos.tar.gz
|
||||||
id: upload_assets_arm64
|
tag: v${{ env.VERSION }}
|
||||||
uses: shogo82148/actions-upload-release-asset@v1
|
body: >
|
||||||
with:
|
${{ env.BODY }}
|
||||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
name: v${{ env.VERSION }}
|
||||||
asset_path: /workdir/casa/upload/linux-arm64-casaos.tar.gz
|
gzip: false
|
||||||
|
allow_override: false
|
||||||
|
prerelease: true
|
||||||
|
# - name: Upload linux-amd64-casaos.tar.gz
|
||||||
|
# id: upload_assets_amd64
|
||||||
|
# uses: shogo82148/actions-upload-release-asset@v1
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||||
|
# asset_path: /workdir/casa/upload/linux-amd64-casaos.tar.gz
|
||||||
|
#
|
||||||
|
# - name: Upload linux-arm64-casaos.tar.gz
|
||||||
|
# id: upload_assets_arm64
|
||||||
|
# uses: shogo82148/actions-upload-release-asset@v1
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||||
|
# asset_path: /workdir/casa/upload/linux-arm64-casaos.tar.gz
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,3 +28,4 @@ gen
|
|||||||
/out/
|
/out/
|
||||||
/db/
|
/db/
|
||||||
/docs/
|
/docs/
|
||||||
|
/conf/
|
||||||
|
|||||||
2
UI
2
UI
Submodule UI updated: 1f2ebd05fa...c75085250a
@@ -1,7 +1,8 @@
|
|||||||
[app]
|
[app]
|
||||||
PAGE_SIZE = 10
|
PAGE_SIZE = 10
|
||||||
RuntimeRootPath = runtime/
|
RuntimeRootPath = runtime/
|
||||||
LogSavePath = /casaOS/logs/server/
|
;LogSavePath = /casaOS/logs/server/
|
||||||
|
LogSavePath = /oasis/logs/server/
|
||||||
LogSaveName = log
|
LogSaveName = log
|
||||||
LogFileExt = log
|
LogFileExt = log
|
||||||
; 必须的格式
|
; 必须的格式
|
||||||
@@ -9,13 +10,17 @@ DateStrFormat = 20060102
|
|||||||
DateTimeFormat = 2006-01-02 15:04:05
|
DateTimeFormat = 2006-01-02 15:04:05
|
||||||
TimeFormat = 15:04:05
|
TimeFormat = 15:04:05
|
||||||
DateFormat = 2006-01-02
|
DateFormat = 2006-01-02
|
||||||
ProjectPath = /casaOS/server
|
;ProjectPath = /casaOS/server
|
||||||
|
ProjectPath = /oasis/server
|
||||||
|
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
HttpPort = 8089
|
HttpPort = 8089
|
||||||
RunMode = release
|
RunMode = debug
|
||||||
ServerApi = https://api.casaos.zimaboard.com
|
;ServerApi = http://113.52.135.30:8090
|
||||||
|
;ServerApi = https://casaos.zimaboard.com
|
||||||
|
;ServerApi = http://192.168.2.167:8090
|
||||||
|
ServerApi = http://192.168.2.142:8090
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
UserName = admin
|
UserName = admin
|
||||||
@@ -42,5 +47,6 @@ SearchSwitch = true
|
|||||||
WidgetsSwitch = false
|
WidgetsSwitch = false
|
||||||
ShortcutsSwitch = true
|
ShortcutsSwitch = true
|
||||||
SearchEngine = baidu
|
SearchEngine = baidu
|
||||||
Background = http://google.com
|
Background = http://baidu.com1
|
||||||
BackgroundType = d
|
BackgroundType = d
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
const CURRENTVERSION = "0.1.2"
|
const CURRENTVERSION = "0.1.4"
|
||||||
|
const BODY = "<li> Modify the publishing process</li> <li>Optimized app parameter display</li>"
|
||||||
|
|||||||
Reference in New Issue
Block a user