mirror of https://github.com/jetkvm/kvm.git
Compare commits
6 Commits
9a99a938d8
...
8c631cb661
Author | SHA1 | Date |
---|---|---|
|
8c631cb661 | |
|
a60e1a5e98 | |
|
4e90883bf8 | |
|
8eaa86ae45 | |
|
354941b54d | |
|
d84c00af94 |
|
@ -0,0 +1,75 @@
|
||||||
|
name: 'Pull Request'
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
paths-ignore:
|
||||||
|
- .gitignore
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: v21.1.0
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: '**/package-lock.json'
|
||||||
|
|
||||||
|
- name: Cache NPM dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: npm-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
npm-cache-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Install Dependencies and Build
|
||||||
|
run: |
|
||||||
|
cd ui
|
||||||
|
npm ci
|
||||||
|
# npm run lint # need to clean lint before enabling this
|
||||||
|
npm run build:prod
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
- name: Cache Prisma Binary
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.npm/_npx
|
||||||
|
key: prisma-binary-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: prisma-binary-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.24.0'
|
||||||
|
|
||||||
|
- name: Cache Go modules
|
||||||
|
id: cache-go-mod
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: go mod download
|
||||||
|
|
||||||
|
- name: Build Go application
|
||||||
|
env:
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: arm
|
||||||
|
GOARM: 7
|
||||||
|
VERSION_DEV: ci-build
|
||||||
|
run: |
|
||||||
|
make frontend
|
||||||
|
make build_dev
|
14
Makefile
14
Makefile
|
@ -2,8 +2,8 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
BUILDDATE ?= $(shell date -u +%FT%T%z)
|
BUILDDATE ?= $(shell date -u +%FT%T%z)
|
||||||
BUILDTS ?= $(shell date -u +%s)
|
BUILDTS ?= $(shell date -u +%s)
|
||||||
REVISION ?= $(shell git rev-parse HEAD)
|
REVISION ?= $(shell git rev-parse HEAD)
|
||||||
VERSION_DEV := 0.4.0-dev$(shell date +%Y%m%d%H%M)
|
VERSION_DEV := 0.4.1-dev$(shell date +%Y%m%d%H%M)
|
||||||
VERSION := 0.3.9
|
VERSION := 0.4.0
|
||||||
|
|
||||||
PROMETHEUS_TAG := github.com/prometheus/common/version
|
PROMETHEUS_TAG := github.com/prometheus/common/version
|
||||||
KVM_PKG_NAME := github.com/jetkvm/kvm
|
KVM_PKG_NAME := github.com/jetkvm/kvm
|
||||||
|
@ -25,7 +25,10 @@ hash_resource:
|
||||||
|
|
||||||
build_dev: hash_resource
|
build_dev: hash_resource
|
||||||
@echo "Building..."
|
@echo "Building..."
|
||||||
$(GO_CMD) build -ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION_DEV)" -o $(BIN_DIR)/jetkvm_app cmd/main.go
|
$(GO_CMD) build \
|
||||||
|
-ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION_DEV)" \
|
||||||
|
-trimpath \
|
||||||
|
-o $(BIN_DIR)/jetkvm_app cmd/main.go
|
||||||
|
|
||||||
build_test2json:
|
build_test2json:
|
||||||
$(GO_CMD) build -o $(BIN_DIR)/test2json cmd/test2json
|
$(GO_CMD) build -o $(BIN_DIR)/test2json cmd/test2json
|
||||||
|
@ -66,7 +69,10 @@ dev_release: frontend build_dev
|
||||||
|
|
||||||
build_release: frontend hash_resource
|
build_release: frontend hash_resource
|
||||||
@echo "Building release..."
|
@echo "Building release..."
|
||||||
$(GO_CMD) build -ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION)" -o bin/jetkvm_app cmd/main.go
|
$(GO_CMD) build \
|
||||||
|
-ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION)" \
|
||||||
|
-trimpath \
|
||||||
|
-o bin/jetkvm_app cmd/main.go
|
||||||
|
|
||||||
release:
|
release:
|
||||||
@if rclone lsf r2://jetkvm-update/app/$(VERSION)/ | grep -q "jetkvm_app"; then \
|
@if rclone lsf r2://jetkvm-update/app/$(VERSION)/ | grep -q "jetkvm_app"; then \
|
||||||
|
|
|
@ -409,7 +409,7 @@ export default function SettingsAccessIndexRoute() {
|
||||||
.
|
.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr className="block w-full dark:border-slate-600" />
|
<hr className="block w-full border-slate-800/20 dark:border-slate-300/20" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<LinkButton
|
<LinkButton
|
||||||
|
@ -469,4 +469,4 @@ export default function SettingsAccessIndexRoute() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsAccessIndexRoute.loader = loader;
|
SettingsAccessIndexRoute.loader = loader;
|
||||||
|
|
|
@ -356,7 +356,7 @@ export default function SettingsNetworkRoute() {
|
||||||
/>
|
/>
|
||||||
</SettingsItem>
|
</SettingsItem>
|
||||||
<AutoHeight>
|
<AutoHeight>
|
||||||
{!networkSettingsLoaded ? (
|
{!networkSettingsLoaded && !networkState?.dhcp_lease ? (
|
||||||
<GridCard>
|
<GridCard>
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
@ -402,7 +402,8 @@ export default function SettingsNetworkRoute() {
|
||||||
/>
|
/>
|
||||||
</SettingsItem>
|
</SettingsItem>
|
||||||
<AutoHeight>
|
<AutoHeight>
|
||||||
{!networkSettingsLoaded ? (
|
{!networkSettingsLoaded &&
|
||||||
|
!(networkState?.ipv6_addresses && networkState.ipv6_addresses.length > 0) ? (
|
||||||
<GridCard>
|
<GridCard>
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
|
Loading…
Reference in New Issue